forked from Trustie/forgeplus
user action DestroyOrganization data_bank
This commit is contained in:
parent
76545cf72f
commit
b52aa0633e
|
@ -30,9 +30,10 @@ class Admins::OrganizationsController < Admins::BaseController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
data_bank = @org.attributes.to_json
|
||||||
@org.destroy!
|
@org.destroy!
|
||||||
Admins::DeleteOrganizationService.call(@org.login)
|
Admins::DeleteOrganizationService.call(@org.login)
|
||||||
UserAction.create(action_id: @org.id, action_type: "DestroyOrganization", user_id: current_user.id, :ip => request.remote_ip, data_bank: @org.attributes.to_json)
|
UserAction.create(action_id: @org.id, action_type: "DestroyOrganization", user_id: current_user.id, :ip => request.remote_ip, data_bank: data_bank)
|
||||||
render_delete_success
|
render_delete_success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue