2
0

Experimental Async Refreshes API (#34918)

This commit is contained in:
David Roetzel
2025-06-12 16:54:00 +02:00
committed by GitHub
parent 825312d4b0
commit 319fbbbfac
11 changed files with 437 additions and 13 deletions

View File

@@ -1,6 +1,8 @@
# frozen_string_literal: true
class Api::V1::Timelines::HomeController < Api::V1::Timelines::BaseController
include AsyncRefreshesConcern
before_action -> { doorkeeper_authorize! :read, :'read:statuses' }, only: [:show]
before_action :require_user!, only: [:show]
@@ -12,6 +14,8 @@ class Api::V1::Timelines::HomeController < Api::V1::Timelines::BaseController
@relationships = StatusRelationshipsPresenter.new(@statuses, current_user&.account_id)
end
add_async_refresh_header(account_home_feed.async_refresh, retry_seconds: 5)
render json: @statuses,
each_serializer: REST::StatusSerializer,
relationships: @relationships,