fb12c7e202
* feature/more.events * keep mapping.user as the creator * cleanup cruft and include slack notifs * capture topic and synapse updates, store the old values * avoid the mapping gets deleted problem * include an indicator of which values changed * style cleanup * remove the hack in favor of a legit way * updated schema file
31 lines
729 B
Ruby
31 lines
729 B
Ruby
# frozen_string_literal: true
|
|
module Api
|
|
module V2
|
|
class MappingsController < RestfulController
|
|
def searchable_columns
|
|
[]
|
|
end
|
|
|
|
def create
|
|
instantiate_resource
|
|
resource.user = current_user if current_user.present?
|
|
resource.updated_by = current_user if current_user.present?
|
|
authorize resource
|
|
create_action
|
|
respond_with_resource
|
|
end
|
|
|
|
def update
|
|
resource.updated_by = current_user if current_user.present?
|
|
update_action
|
|
respond_with_resource
|
|
end
|
|
|
|
def destroy
|
|
resource.updated_by = current_user if current_user.present?
|
|
destroy_action
|
|
head :no_content
|
|
end
|
|
end
|
|
end
|
|
end
|