From 24416c15c71f6d888a121f05ab5339f8abc32b64 Mon Sep 17 00:00:00 2001 From: Tameem Bin Haider Date: Thu, 17 Oct 2024 11:36:46 +0600 Subject: [PATCH] fix: import COUNTRY_CONFIG_URL from env --- packages/auth/src/features/scopes/service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/auth/src/features/scopes/service.ts b/packages/auth/src/features/scopes/service.ts index fc5238a9b4f..580a4a4e139 100644 --- a/packages/auth/src/features/scopes/service.ts +++ b/packages/auth/src/features/scopes/service.ts @@ -9,7 +9,7 @@ * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS. */ -import { COUNTRY_CONFIG_URL } from '@auth/constants' +import { env } from '@auth/environment' import { fetchJSON, joinURL, logger, Roles } from '@opencrvs/commons' import { DEFAULT_ROLES_DEFINITION, @@ -17,7 +17,9 @@ import { } from '@opencrvs/commons/authentication' export async function getUserRoleScopeMapping() { - const roles = await fetchJSON(joinURL(COUNTRY_CONFIG_URL, '/roles')) + const roles = await fetchJSON( + joinURL(env.COUNTRY_CONFIG_URL, '/roles') + ) logger.info( 'Country config implements the new /roles response format. Custom scopes apply'