Fix response of unreblog/unfavourite APIs (#4204)

Both APIs process asynchronously, so reblogged/favourited fields in the response should be set to `false` manually.
This commit is contained in:
unarist
2017-07-15 03:44:53 +09:00
committed by Eugen Rochko
parent 1618b68bfa
commit 1896a154f5
3 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ class Api::V1::Statuses::ReblogsController < Api::BaseController
authorize status_for_destroy, :unreblog?
RemovalWorker.perform_async(status_for_destroy.id)
render json: @status, serializer: REST::StatusSerializer
render json: @status, serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new([@status], current_user&.account_id, reblogs_map: @reblogs_map)
end
private