This commit is contained in:
nilsding 2014-12-12 23:45:49 +01:00
parent 5aab94207a
commit 76c614ea66
2 changed files with 16 additions and 1 deletions

View File

@ -34,8 +34,10 @@ class Ajax::InboxController < ApplicationController
return return
end end
a = nil
begin begin
inbox.answer params[:answer], current_user a = inbox.answer params[:answer], current_user
rescue rescue
@status = :err @status = :err
@message = "An error occurred" @message = "An error occurred"
@ -43,6 +45,10 @@ class Ajax::InboxController < ApplicationController
return return
end end
current_user.services.each do |service|
service.post a
end
@status = :okay @status = :okay
@message = "Successfully answered question." @message = "Successfully answered question."
@success = true @success = true

View File

@ -0,0 +1,9 @@
class ShareWorker
include Sidekiq::Worker
sidekiq_options queue: :share
def perform(answer_id)
# fuck this… for now
end
end