gitlab-org--gitlab-foss/app/observers/key_observer.rb
Dmitriy Zaporozhets d40e6bc228 Fix key observer
2013-06-25 12:02:10 +03:00

19 lines
320 B
Ruby

class KeyObserver < BaseObserver
def after_create(key)
GitlabShellWorker.perform_async(
:add_key,
key.shell_id,
key.key
)
notification.new_key(key)
end
def after_destroy(key)
GitlabShellWorker.perform_async(
:remove_key,
key.shell_id,
key.key,
)
end
end