Merge commit '1a2038775c0a999024a615348fcba6240e27b0fa' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2026-05-06 21:00:32 +02:00
commit 49310aeecf
60 files changed
+1568 -335

No files matched your search

@@ -28,9 +28,10 @@ class Api::V1Alpha::CollectionsController < Api::BaseController
cache_if_unauthenticated!
authorize @account, :index_collections?
render json: @collections, each_serializer: REST::CollectionSerializer, adapter: :json
presenter = CollectionsPresenter.new(collections: @collections)
render json: presenter, serializer: REST::CollectionsWithAccountPreviewsSerializer
rescue Mastodon::NotPermittedError
render json: { collections: [] }
render json: { collections: [], partial_accounts: [] }
end
def show
@@ -73,6 +74,7 @@ class Api::V1Alpha::CollectionsController < Api::BaseController
def set_collections
@collections = @account.collections
.with_tag
.preload(top_items: :account)
.order(created_at: :desc)
.offset(offset_param)
.limit(limit_param(DEFAULT_COLLECTIONS_LIMIT))