Merge commit '71d4ce1c228bab470fa9d3bcb5a130cf53665103' into glitch-soc/merge-upstream
This commit is contained in:
commit
7da6b07c75
121 files changed
+789
-358
No files matched your search
@@ -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,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1Alpha::AsyncRefreshesController < Api::BaseController
|
||||
before_action -> { doorkeeper_authorize! :read }
|
||||
before_action :require_user!
|
||||
|
||||
def show
|
||||
async_refresh = AsyncRefresh.find(params[:id])
|
||||
|
||||
if async_refresh
|
||||
render json: async_refresh
|
||||
else
|
||||
not_found
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user