First draft of API to get a single collection (#37053)
This commit is contained in:
1 parent
1f9ddb7cf6
commit
2d203ca72a
11 files changed
+152
-5
No files matched your search
@@ -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