Files
zyt/identity-admin/server/route/app.php
T
2026-11-11 13:53:14 +08:00

32 lines
2.8 KiB
PHP

<?php
declare(strict_types=1);
use app\controller\ApiController;
use think\facade\Route;
// Every exposed action is explicitly registered with its HTTP method and permission.
Route::get('adminapi/health', static fn () => (new ApiController())->dispatch('health'))->completeMatch();
Route::post('adminapi/login/account', static fn () => (new ApiController())->dispatch('login'))->completeMatch();
Route::post('adminapi/login/logout', static fn () => (new ApiController())->dispatch('logout'))->completeMatch();
Route::get('adminapi/auth.admin/mySelf', static fn () => (new ApiController())->dispatch('myself'))->completeMatch();
Route::post('adminapi/auth.admin/password', static fn () => (new ApiController())->dispatch('password'))->completeMatch();
Route::get('adminapi/auth/options', static fn () => (new ApiController())->dispatch('options'))->completeMatch();
Route::get('adminapi/group/context', static fn () => (new ApiController())->dispatch('group.context'))->completeMatch();
Route::get('adminapi/group/members', static fn () => (new ApiController())->dispatch('group.members'))->completeMatch();
Route::post('adminapi/group/company/save', static fn () => (new ApiController())->dispatch('group.company.save'))->completeMatch();
Route::post('adminapi/group/member/save', static fn () => (new ApiController())->dispatch('group.member.save'))->completeMatch();
Route::post('adminapi/group/sso/authorize', static fn () => (new ApiController())->dispatch('group.sso.authorize'))->completeMatch();
Route::post('adminapi/group/sso/exchange', static fn () => (new ApiController())->dispatch('group.sso.exchange'))->completeMatch();
Route::post('adminapi/group/kefu/login', static fn () => (new ApiController())->dispatch('group.kefu.login'))->completeMatch();
Route::get('adminapi/group/application/access', static fn () => (new ApiController())->dispatch('group.application.access'))->completeMatch();
Route::get('adminapi/group/application/access-options', static fn () => (new ApiController())->dispatch('group.application.access-options'))->completeMatch();
Route::post('adminapi/group/application/access-update', static fn () => (new ApiController())->dispatch('group.application.access-update'))->completeMatch();
Route::post('adminapi/group/application/sync', static fn () => (new ApiController())->dispatch('group.application.sync'))->completeMatch();
foreach (['admin', 'role', 'menu', 'dept'] as $kind) {
Route::get('adminapi/auth.' . $kind . '/lists', static fn () => (new ApiController())->dispatch($kind . '.lists', 'auth.' . $kind . '/lists'))->completeMatch();
foreach (['add', 'edit', 'delete'] as $action) {
Route::post('adminapi/auth.' . $kind . '/' . $action, static fn () => (new ApiController())->dispatch($kind . '.' . $action, 'auth.' . $kind . '/' . $action))->completeMatch();
}
}