diff options
Diffstat (limited to 'app/controllers/api_controller.rb')
-rw-r--r-- | app/controllers/api_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 4ccf20bc9..c4ad450cf 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -35,4 +35,10 @@ class ApiController < ApplicationController def render_empty render json: {}, status: 200 end + + def set_maps(statuses) + status_ids = statuses.flat_map { |s| [s.id, s.reblog_of_id] }.compact + @reblogs_map = Status.reblogs_map(status_ids, current_user.account) + @favourites_map = Status.favourites_map(status_ids, current_user.account) + end end |