diff options
Diffstat (limited to 'main/app/sprinkles/admin/routes/groups.php')
-rwxr-xr-x | main/app/sprinkles/admin/routes/groups.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/app/sprinkles/admin/routes/groups.php b/main/app/sprinkles/admin/routes/groups.php new file mode 100755 index 0000000..e861960 --- /dev/null +++ b/main/app/sprinkles/admin/routes/groups.php @@ -0,0 +1,39 @@ +<?php +/** + * UserFrosting (http://www.userfrosting.com) + * + * @link https://github.com/userfrosting/UserFrosting + * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) + */ + +/** + * Routes for administrative group management. + */ +$app->group('/groups', function () { + $this->get('', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:pageList') + ->setName('uri_groups'); + + $this->get('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:pageInfo'); +})->add('authGuard'); + +$app->group('/api/groups', function () { + $this->delete('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:delete'); + + $this->get('', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getList'); + + $this->get('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getInfo'); + + $this->get('/g/{slug}/users', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getUsers'); + + $this->post('', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:create'); + + $this->put('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:updateInfo'); +})->add('authGuard'); + +$app->group('/modals/groups', function () { + $this->get('/confirm-delete', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getModalConfirmDelete'); + + $this->get('/create', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getModalCreate'); + + $this->get('/edit', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getModalEdit'); +})->add('authGuard'); |