gitlab-org--gitlab-foss/app/observers/key_observer.rb

20 lines
320 B
Ruby
Raw Normal View History

class KeyObserver < BaseObserver
2013-06-25 05:02:10 -04:00
def after_create(key)
2013-02-11 12:27:26 -05:00
GitlabShellWorker.perform_async(
2013-02-04 08:07:56 -05:00
:add_key,
key.shell_id,
2013-02-04 08:07:56 -05:00
key.key
2013-01-28 14:02:10 -05:00
)
notification.new_key(key)
end
def after_destroy(key)
2013-02-11 12:27:26 -05:00
GitlabShellWorker.perform_async(
2013-01-28 14:02:10 -05:00
:remove_key,
key.shell_id,
2013-02-04 08:07:56 -05:00
key.key,
2013-01-28 14:02:10 -05:00
)
end
end