diff --git a/.env.example b/.env.example index ade77b7..a732c0c 100644 --- a/.env.example +++ b/.env.example @@ -37,4 +37,5 @@ ONE_LOGIN_ENABLED=true SESSION_COOKIE_NAME=session_id ADMIN_BACKEND_HOST=http:localhost:8081 V2_LOGOUT_URL=http://localhost:8082/v2/logout -APPLICANT_BACKEND_HOST=http://localhost:8080 \ No newline at end of file +APPLICANT_BACKEND_HOST=http://localhost:8080 +TECHNICAL_SUPPORT_DOMAIN=http://localhost:3000/find/api/admin \ No newline at end of file diff --git a/src/service/user-service.ts b/src/service/user-service.ts index 67ee37a..c4b3e1b 100644 --- a/src/service/user-service.ts +++ b/src/service/user-service.ts @@ -1,5 +1,6 @@ const USER_SERVICE_HOST = process.env.USER_SERVICE_HOST; const USER_TOKEN_NAME = process.env.USER_TOKEN_NAME; +const TECHNICAL_SUPPORT_DOMAIN = process.env.TECHNICAL_SUPPORT_DOMAIN; export async function checkUserLoggedIn(userToken: string) { const requestUrl = `${USER_SERVICE_HOST}/is-user-logged-in`; @@ -35,5 +36,7 @@ export function getUserRolesRelatedRedirect( ) { if (userRoles.isSuperAdmin) return `${adminUrl}/super-admin-dashboard`; else if (userRoles.isAdmin) return `${adminUrl}/dashboard`; + else if (userRoles.isTechnicalSuppport) + return `${TECHNICAL_SUPPORT_DOMAIN}/api-keys/manage`; else if (userRoles.isApplicant) return `${applicantUrl}/dashboard`; }