Add and real APi, now Cnp of NoteController...

This commit is contained in:
Matias De lellis
2020-06-15 12:44:34 -03:00
parent c4c9984bba
commit 77efdbaefc
3 changed files with 158 additions and 62 deletions

View File

@@ -1,18 +1,10 @@
<?php
return [
'resources' => [
'note' => ['url' => '/notes'],
'tag' => ['url' => '/tags'],
'note_api' => ['url' => '/api/0.1/notes']
],
'routes' => [
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'note_api#preflighted_cors', 'url' => '/api/0.1/{path}',
'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
['name' => 'note#get_user_groups_and_users_with_share', 'url' => '/api/0.1/getusergroups', 'verb' => 'POST'],
['name' => 'note#add_group_share', 'url' => '/api/0.1/groups/addshare', 'verb' => 'POST'],
['name' => 'note#remove_group_share', 'url' => '/api/0.1/groups/removeshare', 'verb' => 'POST'],
['name' => 'note#add_user_share', 'url' => '/api/0.1/users/addshare', 'verb' => 'POST'],
['name' => 'note#remove_user_share', 'url' => '/api/0.1/users/removeshare', 'verb' => 'POST']
]
return ['resources' =>
[
'note' => ['url' => '/notes'],
'noteApi' => ['url' => '/api/v1/notes']
],
'routes' => [
['name' => 'page#index', 'url' => '/', 'verb' => 'GET']
]
];