From 1896a154f5f5edd4f94c58e5c69dd70ebc728e3d Mon Sep 17 00:00:00 2001 From: unarist Date: Sat, 15 Jul 2017 03:44:53 +0900 Subject: Fix response of unreblog/unfavourite APIs (#4204) Both APIs process asynchronously, so reblogged/favourited fields in the response should be set to `false` manually. --- app/controllers/api/v1/statuses/favourites_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/api/v1/statuses/favourites_controller.rb') diff --git a/app/controllers/api/v1/statuses/favourites_controller.rb b/app/controllers/api/v1/statuses/favourites_controller.rb index 4c4b0c160..35f8a48cd 100644 --- a/app/controllers/api/v1/statuses/favourites_controller.rb +++ b/app/controllers/api/v1/statuses/favourites_controller.rb @@ -19,7 +19,7 @@ class Api::V1::Statuses::FavouritesController < Api::BaseController UnfavouriteWorker.perform_async(current_user.account_id, @status.id) - render json: @status, serializer: REST::StatusSerializer + render json: @status, serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new([@status], current_user&.account_id, favourites_map: @favourites_map) end private -- cgit