Commit 265f5179 authored by Rajendra Kadam's avatar Rajendra Kadam

Use DestroyService for deleting SSH keys via API from admin

parent 85a85254
......@@ -306,7 +306,7 @@ module API
key = user.keys.find_by(id: params[:key_id])
not_found!('Key') unless key
destroy_conditionally!(key)
::Keys::DestroyService.new(current_user).execute(key)
end
# rubocop: enable CodeReuse/ActiveRecord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment