From f1575bfffd5df77b68e60f36abc3bbdc6245d91f Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 28 Jul 2020 22:28:56 -0500 Subject: [UI, API, Rebase] Clean up original domain permissions API --- app/controllers/api/v1/accounts/statuses_controller.rb | 2 +- app/controllers/api/v1/statuses/bookmarks_controller.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 1c744ad73..3e0feed7e 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -8,7 +8,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController def index @statuses = load_statuses - render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) + render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_account&.id) end private diff --git a/app/controllers/api/v1/statuses/bookmarks_controller.rb b/app/controllers/api/v1/statuses/bookmarks_controller.rb index 19963c002..a4c878ed4 100644 --- a/app/controllers/api/v1/statuses/bookmarks_controller.rb +++ b/app/controllers/api/v1/statuses/bookmarks_controller.rb @@ -24,6 +24,7 @@ class Api::V1::Statuses::BookmarksController < Api::BaseController bookmark&.destroy! + render json: @status, serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new([@status], current_account.id, bookmarks_map: { @status.id => false }), current_account_id: current_user&.account_id render json: @status, serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new([@status], current_account.id, bookmarks_map: { @status.id => false }) rescue Mastodon::NotPermittedError not_found -- cgit