log super admin

This commit is contained in:
harid 2025-10-22 15:43:18 +07:00
parent a1be5c9946
commit ad6b6401d4

View file

@ -69,6 +69,12 @@ async function logMiddleware(req: Request, res: Response, next: NextFunction) {
if (req.url.startsWith("/api/v1/org/profile/")) system = "registry";
if (req.url.startsWith("/api/v1/org/profile-employee/")) system = "registry";
if (req.url.startsWith("/api/v1/org/profile-temp/")) system = "registry";
if (req.url.startsWith("/api/v1/org/commandType/admin")) system = "admin";
if (req.url.startsWith("/api/v1/org/commandSys/")) system = "admin";
if (req.url.startsWith("/api/v1/org/commandSalary/")) system = "admin";
if (req.url.startsWith("/api/v1/org/apiKey/")) system = "admin";
if (req.url.startsWith("/api/v1/org/api-manage/")) system = "admin";
const level = LOG_LEVEL_MAP[process.env.LOG_LEVEL ?? "debug"] || 4;
const profileByKeycloak = await repoProfile.findOne({