diff --git a/apps/authentication/src/auth/auth.service.ts b/apps/authentication/src/auth/auth.service.ts index 83494c9..69d73d5 100644 --- a/apps/authentication/src/auth/auth.service.ts +++ b/apps/authentication/src/auth/auth.service.ts @@ -17,7 +17,7 @@ export class AuthService { const permissionRes = await lastValueFrom( this.httpService .post( - `http://localhost:6000/user/checkPermission`, + `${process.env.AUTH_SELF_URL}/user/checkPermission`, { caId: authDTO.caId, userEmail @@ -86,7 +86,7 @@ export class AuthService { const userRes = await lastValueFrom( this.httpService .patch( - `http://localhost:6000/user/updateUserCaIds`, + `${process.env.AUTH_SELF_URL}/user/updateUserCaIds`, { caId: caRes.caId, userEmail @@ -113,7 +113,7 @@ export class AuthService { const permissionRes = await lastValueFrom( this.httpService .post( - `http://localhost:6000/user/checkPermission`, + `${process.env.AUTH_SELF_URL}/user/checkPermission`, { caId, userEmail diff --git a/apps/authentication/src/user/user.service.ts b/apps/authentication/src/user/user.service.ts index 23417f9..4851091 100644 --- a/apps/authentication/src/user/user.service.ts +++ b/apps/authentication/src/user/user.service.ts @@ -11,10 +11,10 @@ export class UserService { const userRes = await lastValueFrom( this.httpService .get( - `https://auth.konnect.samagra.io/api/user?email=${email}`, + `${process.env.FUSION_AUTH_URL}/api/user?email=${email}`, { headers: { - Authorization: 'S2lTEmQZHrIjWUq30-4UJQDq0FYqSXOUhak24zcYZHYFbXTKawwCu0dr' + Authorization: process.env.FUSION_AUTH_API_KEY } } ) @@ -40,7 +40,7 @@ export class UserService { let userRes = await lastValueFrom( this.httpService .get( - `http://localhost:6000/user/${data.userEmail}`, { + `${process.env.AUTH_SELF_URL}/user/${data.userEmail}`, { headers: { Authorization: token } @@ -61,12 +61,12 @@ export class UserService { const userUpdateRes = await lastValueFrom( this.httpService .put( - `https://auth.konnect.samagra.io/api/user/${userRes.id}`, { + `${process.env.FUSION_AUTH_URL}/api/user/${userRes.id}`, { user: userRes }, { headers: { - Authorization: 'S2lTEmQZHrIjWUq30-4UJQDq0FYqSXOUhak24zcYZHYFbXTKawwCu0dr' + Authorization: process.env.FUSION_AUTH_API_KEY } } ) @@ -89,7 +89,7 @@ export class UserService { let userRes = await lastValueFrom( this.httpService .get( - `http://localhost:6000/user/${data.userEmail}`, { + `${process.env.AUTH_SELF_URL}/user/${data.userEmail}`, { headers: { Authorization: token }