mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
First draft of API to get a single collection (#37053)
This commit is contained in:
@@ -9,7 +9,14 @@ class Api::V1Alpha::CollectionsController < Api::BaseController
|
||||
|
||||
before_action -> { doorkeeper_authorize! :write, :'write:collections' }, only: [:create]
|
||||
|
||||
before_action :require_user!
|
||||
before_action :require_user!, only: [:create]
|
||||
|
||||
def show
|
||||
cache_if_unauthenticated!
|
||||
@collection = Collection.find(params[:id])
|
||||
|
||||
render json: @collection, serializer: REST::CollectionSerializer
|
||||
end
|
||||
|
||||
def create
|
||||
@collection = CreateCollectionService.new.call(collection_params, current_user.account)
|
||||
|
||||
Reference in New Issue
Block a user