Remove useless route and 'document' route rules
This commit is contained in:
parent
06fe8bd276
commit
15418a67f0
@ -10,47 +10,47 @@ require 'app-setup.php';
|
||||
Auth::CreateInitialAdmin($container);
|
||||
Auth::CreateJwtKey();
|
||||
|
||||
$app->get ('/', 'Invalid:noApi');
|
||||
// Request | Route | Handler | Minimum Security Level
|
||||
//---------|---------------------|---------------------------------|---------------------------
|
||||
$app->get ('/', 'Invalid:noApi');
|
||||
|
||||
$app->get ('/boards', 'Boards:getAllBoards');
|
||||
$app->get ('/boards/{id}', 'Boards:getBoard');
|
||||
$app->post ('/boards', 'Boards:addBoard');
|
||||
$app->post ('/boards/{id}', 'Boards:updateBoard');
|
||||
$app->delete('/boards/{id}', 'Boards:removeBoard');
|
||||
$app->get ('/boards', 'Boards:getAllBoards'); // User (by board access)
|
||||
$app->get ('/boards/{id}', 'Boards:getBoard'); // User (with board access)
|
||||
$app->post ('/boards', 'Boards:addBoard'); // Admin
|
||||
$app->post ('/boards/{id}', 'Boards:updateBoard'); // BoardAdmin (with board access)
|
||||
$app->delete('/boards/{id}', 'Boards:removeBoard'); // Admin
|
||||
|
||||
$app->get ('/autoactions', 'AutoActions:getAllActions');
|
||||
$app->post ('/autoactions', 'AutoActions:addAction');
|
||||
$app->delete('/autoactions/{id}', 'AutoActions:removeAction');
|
||||
$app->get ('/autoactions', 'AutoActions:getAllActions'); // User
|
||||
$app->post ('/autoactions', 'AutoActions:addAction'); // BoardAdmin
|
||||
$app->delete('/autoactions/{id}', 'AutoActions:removeAction'); // BoardAdmin
|
||||
|
||||
$app->get ('/columns/{id}', 'Columns:getColumn');
|
||||
$app->post ('/columns', 'Columns:addColumn');
|
||||
$app->post ('/columns/{id}', 'Columns:updateColumn');
|
||||
$app->delete('/columns/{id}', 'Columns:removeColumn');
|
||||
$app->get ('/columns/{id}', 'Columns:getColumn'); // User (with board access)
|
||||
$app->post ('/columns', 'Columns:addColumn'); // BoardAdmin
|
||||
$app->post ('/columns/{id}', 'Columns:updateColumn'); // BoardAdmin
|
||||
$app->delete('/columns/{id}', 'Columns:removeColumn'); // BoardAdmin
|
||||
|
||||
$app->get ('/tasks/{id}', 'Tasks:getTask');
|
||||
$app->post ('/tasks', 'Tasks:addTask');
|
||||
$app->post ('/tasks/{id}', 'Tasks:updateTask');
|
||||
$app->delete('/tasks/{id}', 'Tasks:removeTask');
|
||||
$app->get ('/tasks/{id}', 'Tasks:getTask'); // User
|
||||
$app->post ('/tasks', 'Tasks:addTask'); // User
|
||||
$app->post ('/tasks/{id}', 'Tasks:updateTask'); // BoardAdmin or submitter
|
||||
$app->delete('/tasks/{id}', 'Tasks:removeTask'); // BoardAdmin or submitter
|
||||
|
||||
$app->get ('/comments/{id}', 'Comments:getComment');
|
||||
$app->post ('/comments', 'Comments:addComment');
|
||||
$app->post ('/comments/{id}', 'Comments:updateComment');
|
||||
$app->delete('/comments/{id}', 'Comments:removeComment');
|
||||
$app->get ('/comments/{id}', 'Comments:getComment'); // User
|
||||
$app->post ('/comments', 'Comments:addComment'); // User
|
||||
$app->post ('/comments/{id}', 'Comments:updateComment'); // BoardAdmin or submitter
|
||||
$app->delete('/comments/{id}', 'Comments:removeComment'); // BoardAdmin or submitter
|
||||
|
||||
$app->get ('/attachments/{id}', 'Attachments:getAttachment');
|
||||
$app->post ('/attachments', 'Attachments:addAttachment');
|
||||
$app->post ('/attachments/{id}', 'Attachments:updateAttachment');
|
||||
$app->delete('/attachments/{id}', 'Attachments:removeAttachment');
|
||||
$app->get ('/attachments/{id}', 'Attachments:getAttachment'); // User
|
||||
$app->post ('/attachments', 'Attachments:addAttachment'); // User
|
||||
$app->delete('/attachments/{id}', 'Attachments:removeAttachment'); // BoardAdmin or submitter
|
||||
|
||||
$app->get ('/users', 'Users:getAllUsers');
|
||||
$app->get ('/users/{id}', 'Users:getUser');
|
||||
$app->post ('/users', 'Users:addUser');
|
||||
$app->post ('/users/{id}', 'Users:updateUser');
|
||||
$app->delete('/users/{id}', 'Users:removeUser');
|
||||
$app->get ('/users', 'Users:getAllUsers'); // User (by board access)
|
||||
$app->get ('/users/{id}', 'Users:getUser'); // User (by board access)
|
||||
$app->post ('/users', 'Users:addUser'); // Admin
|
||||
$app->post ('/users/{id}', 'Users:updateUser'); // Admin
|
||||
$app->delete('/users/{id}', 'Users:removeUser'); // Admin
|
||||
|
||||
$app->post('/authenticate', 'Auth:authenticate');
|
||||
$app->post('/login', 'Auth:login');
|
||||
$app->post('/logout', 'Auth:logout');
|
||||
$app->post('/login', 'Auth:login'); // Unsecured
|
||||
$app->post('/logout', 'Auth:logout'); // Unsecured
|
||||
|
||||
$app->run();
|
||||
R::close();
|
||||
|
Reference in New Issue
Block a user