Skip to content

Commit

Permalink
Removed hardcode envs
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-s19 committed Jun 27, 2023
1 parent be768bd commit ac79c91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions apps/authentication/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions apps/authentication/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
)
Expand All @@ -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
}
Expand All @@ -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
}
}
)
Expand All @@ -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
}
Expand Down

0 comments on commit ac79c91

Please sign in to comment.