about summary refs log tree commit diff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/statuses_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb
index 8b7690850..453d003da 100644
--- a/app/controllers/api/v1/statuses_controller.rb
+++ b/app/controllers/api/v1/statuses_controller.rb
@@ -83,7 +83,11 @@ class Api::V1::StatusesController < ApiController
   end
 
   def unfavourite
-    @status = UnfavouriteService.new.call(current_user.account, Status.find(params[:id])).status.reload
+    @status         = Status.find(params[:id])
+    @favourited_map = { @status.id => false }
+
+    UnfavouriteWorker.perform_async(current_user.account_id, @status.id)
+
     render action: :show
   end