diff --git a/app/library/App/Resources/ProjectResource.php b/app/library/App/Resources/ProjectResource.php index 2a1ac44..aad7bee 100644 --- a/app/library/App/Resources/ProjectResource.php +++ b/app/library/App/Resources/ProjectResource.php @@ -26,17 +26,28 @@ class ProjectResource extends ApiResource { ->name('Project') ->model(Project::class) ->expectsJsonData() - ->transformer(ProjectTransformer::class) - ->handler(ProjectController::class) - ->handler(CrudResourceController::class) - ->itemKey('projects') + ->itemKey('project') ->collectionKey('projects') - ->allow(AclRoles::AUTHORIZED) + ; + + /** transformers **/ + $this + ->transformer(ProjectTransformer::class); + + /** handlers **/ + $this + ->handler(ProjectController::class) + ->handler(CrudResourceController::class); + + /** general roles **/ + $this + ->allow(AclRoles::AUTHORIZED); + /** endpoints **/ + $this ->endpoint(ApiEndpoint::post('/test', 'test') ->description('Returns the currently logged in user') ) - ->endpoint(ApiEndpoint::all()) ->endpoint(ApiEndpoint::create()) ->endpoint(ApiEndpoint::find()) @@ -44,6 +55,7 @@ class ProjectResource extends ApiResource { ->endpoint(ApiEndpoint::remove()) ; + } } \ No newline at end of file -- libgit2 0.21.4