diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-04-27 04:59:09 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-04-27 04:59:09 +0300 |
commit | 5750dfb1bb1d7246961d8ea209c2704d07b0706d (patch) | |
tree | 554c94f14366e78aaa9c264694e297e82b0b7745 /libraries/routes.php | |
parent | f28dc343d72e34da932cc8809b741a1282041d93 (diff) |
Extract method to get edit user group modal form
Creates a new route: /server/user-groups/edit-form
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'libraries/routes.php')
-rw-r--r-- | libraries/routes.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libraries/routes.php b/libraries/routes.php index 38e085d703..1b3a3d443b 100644 --- a/libraries/routes.php +++ b/libraries/routes.php @@ -247,7 +247,10 @@ return static function (RouteCollector $routes): void { $routes->get('/queries', [QueriesController::class, 'index']); $routes->addRoute(['GET', 'POST'], '/variables', [StatusVariables::class, 'index']); }); - $routes->addRoute(['GET', 'POST'], '/user-groups', [UserGroupsController::class, 'index']); + $routes->addGroup('/user-groups', static function (RouteCollector $routes): void { + $routes->addRoute(['GET', 'POST'], '', [UserGroupsController::class, 'index']); + $routes->get('/edit-form', [UserGroupsController::class, 'editUserGroupModalForm']); + }); $routes->addGroup('/variables', static function (RouteCollector $routes): void { $routes->get('', [VariablesController::class, 'index']); $routes->get('/get/{name}', [VariablesController::class, 'getValue']); |