about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-28 22:28:56 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:16 -0500
commitf1575bfffd5df77b68e60f36abc3bbdc6245d91f (patch)
treeaeeeecc32d3d7bfa7dea96ec0f4383a4bb153687 /app/controllers
parent054e15e4f03eecb174374466581b9662a6b38e24 (diff)
[UI, API, Rebase] Clean up original domain permissions API
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/accounts/statuses_controller.rb2
-rw-r--r--app/controllers/api/v1/statuses/bookmarks_controller.rb1
2 files changed, 2 insertions, 1 deletions
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