diff --git a/app/controllers/ajax/inbox_controller.rb b/app/controllers/ajax/inbox_controller.rb index 2f30106f..a8c33547 100644 --- a/app/controllers/ajax/inbox_controller.rb +++ b/app/controllers/ajax/inbox_controller.rb @@ -34,8 +34,10 @@ class Ajax::InboxController < ApplicationController return end + a = nil + begin - inbox.answer params[:answer], current_user + a = inbox.answer params[:answer], current_user rescue @status = :err @message = "An error occurred" @@ -43,6 +45,10 @@ class Ajax::InboxController < ApplicationController return end + current_user.services.each do |service| + service.post a + end + @status = :okay @message = "Successfully answered question." @success = true diff --git a/app/workers/share_worker.rb b/app/workers/share_worker.rb new file mode 100644 index 00000000..079baaee --- /dev/null +++ b/app/workers/share_worker.rb @@ -0,0 +1,9 @@ +class ShareWorker + include Sidekiq::Worker + + sidekiq_options queue: :share + + def perform(answer_id) + # fuck this… for now + end +end \ No newline at end of file