about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-07 12:58:42 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-07 12:58:42 +0100
commitf099bc6091b55c598a55f252041cb3af6043caf4 (patch)
tree8fe84f1d08e231da656829494f033331b1f171c0 /app/controllers/api
parentffe48fd7c6b970bc9b98bf999535e49572e82035 (diff)
Adding API for favouriting a status
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/statuses_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/api/statuses_controller.rb b/app/controllers/api/statuses_controller.rb
index 872558f8e..b1633ab6c 100644
--- a/app/controllers/api/statuses_controller.rb
+++ b/app/controllers/api/statuses_controller.rb
@@ -15,4 +15,9 @@ class Api::StatusesController < ApiController
     @status = ReblogService.new.(current_user.account, Status.find(params[:id]))
     render action: :show
   end
+
+  def favourite
+    @status = FavouriteService.new.(current_user.account, Status.find(params[:id])).status
+    render action: :show
+  end
 end