Add modular admin CRUD UI, fix MikroORM migrations/config and update static admin routing

This commit is contained in:
2026-03-18 16:52:05 -03:00
parent 56a926b10b
commit 9e60600a5d
19 changed files with 1921 additions and 563 deletions

View File

@@ -18,6 +18,11 @@ let AuthGuard = class AuthGuard {
}
canActivate(context) {
const request = context.switchToHttp().getRequest();
// Allow the admin UI endpoints to be accessed without authentication.
// The UI is served from /admin and calls /api/admin/modules.
if (request.method === 'GET' && request.url?.startsWith('/api/admin')) {
return true;
}
const authHeader = request.headers['authorization'] || '';
const token = Array.isArray(authHeader) ? authHeader[0] : authHeader;
if (!token) {