- Required overwriting a bunch of base code to slot in the handling - Admins are shown with yellow text in their organisation label
24 lines
887 B
PHP
24 lines
887 B
PHP
<?php
|
|
|
|
/*
|
|
* AVSDev UF Organisations (https://avsdev.uk)
|
|
*
|
|
* @link https://git.avsdev.uk/avsdev/sprinkle-organisations
|
|
* @license https://git.avsdev.uk/avsdev/sprinkle-organisations/blob/master/LICENSE.md (LGPL-3.0 License)
|
|
*/
|
|
|
|
use UserFrosting\Sprinkle\Core\Util\NoCache;
|
|
|
|
/*
|
|
* Extra routes for administrative user management.
|
|
*/
|
|
$app->group('/api/users', function () {
|
|
$this->get('/u/{user_name}/organisations', 'UserFrosting\Sprinkle\Organisations\Controller\UserController:getOrganisations');
|
|
|
|
$this->put('/u/{user_name}/{field}', 'UserFrosting\Sprinkle\Organisations\Controller\UserController:updateField');
|
|
})->add('authGuard')->add(new NoCache());
|
|
|
|
$app->group('/modals/users', function () {
|
|
$this->get('/organisations', 'UserFrosting\Sprinkle\Organisations\Controller\UserController:getModalEditOrganisations');
|
|
})->add('authGuard')->add(new NoCache());
|