diff --git a/app/library/App/Model/Project.php b/app/library/App/Model/Project.php index bd78b43..16a7d60 100644 --- a/app/library/App/Model/Project.php +++ b/app/library/App/Model/Project.php @@ -29,11 +29,11 @@ class Project extends \App\Mvc\DateTrackingModel { ]; } - public function initialize() { - - $this->belongsTo('user_id', User::class, 'id', [ - 'alias' => 'User', - ]); - } +// public function initialize() { +// +// $this->belongsTo('user_id', User::class, 'id', [ +// 'alias' => 'User', +// ]); +// } } \ No newline at end of file diff --git a/app/library/App/Resources/ProjectResource.php b/app/library/App/Resources/ProjectResource.php index c512562..cc5a09b 100644 --- a/app/library/App/Resources/ProjectResource.php +++ b/app/library/App/Resources/ProjectResource.php @@ -26,9 +26,11 @@ class ProjectResource extends ApiResource { ->expectsJsonData() ->transformer(ProjectTransformer::class) ->handler(CrudResourceController::class) - ->itemKey('project') + ->singleKey('project') + ->multipleKey('projects') + //->itemKey('project') ->collectionKey('projects') - ->deny(AclRoles::UNAUTHORIZED) + ->alow(AclRoles::USER) ->endpoint(ApiEndpoint::all()) ->endpoint(ApiEndpoint::create()) -- libgit2 0.21.4