diff --git a/package.json b/package.json index 8d70147e9..aba0f1d95 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "generate:messages:notifications": "rimraf generated/messages && gen-api-models --api-spec notification_queue_messages.yaml --out-dir generated/messages", "generate:proxy:myportal-models": "rimraf generated/myportal && gen-api-models --api-spec api_myportal.yaml --out-dir generated/myportal", "generate:proxy:trial-system-models": "rimraf generated/trial-system && gen-api-models --api-spec api_trial_system.yaml --out-dir generated/trial-system", - "generate:api:trial-system": "rimraf generated/trial-system-api && gen-api-models --api-spec https://raw.githubusercontent.com/pagopa/trial-system/59d0a1e462bf6dc8aee76ee5526d5cf4a4a73c77/apps/functions-subscription/api/internal.yaml --no-strict --out-dir generated/trial-system-api --request-types --response-decoders --client", + "generate:api:trial-system": "rimraf generated/trial-system-api && gen-api-models --api-spec https://raw.githubusercontent.com/pagopa/trial-system/697dfe57804d293876e43e786c9628d71276655b/infra/resources/modules/commons/api/ts_management/v1/_openapi.yaml --no-strict --out-dir generated/trial-system-api --request-types --response-decoders --client", "generate:proxy:first-lc-models": "rimraf generated/first-lc-proxy-models && gen-api-models --api-spec api_lollipop_first_consumer.yaml --out-dir generated/first-lc-proxy-models", "generate:proxy:public-models": "rimraf generated/public && gen-api-models --api-spec api_public.yaml --out-dir generated/public", "generate:api:io-messages": "rimraf generated/io-messages-api && gen-api-models --api-spec https://raw.githubusercontent.com/pagopa/io-functions-app-messages/v5.3.0/openapi/index.yaml --no-strict --out-dir generated/io-messages-api --request-types --response-decoders --client", diff --git a/src/config.ts b/src/config.ts index 58ba404b3..db7df43dc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -636,11 +636,11 @@ export const FF_TRIAL_SYSTEM_ENABLED = export const TRIAL_SYSTEM_API_BASE_PATH = getRequiredENVVar( "TRIAL_SYSTEM_API_BASE_PATH" ); -export const TRIAL_SYSTEM_API_KEY = getRequiredENVVar("TRIAL_SYSTEM_API_KEY"); +export const TRIAL_SYSTEM_APIM_KEY = getRequiredENVVar("TRIAL_SYSTEM_APIM_KEY"); export const TRIAL_SYSTEM_API_URL = getRequiredENVVar("TRIAL_SYSTEM_API_URL"); export const TRIAL_SYSTEM_CLIENT = TrialSystemAPIClient( - TRIAL_SYSTEM_API_KEY, + TRIAL_SYSTEM_APIM_KEY, TRIAL_SYSTEM_API_URL ); export const IO_WALLET_API_KEY = getRequiredENVVar("IO_WALLET_API_KEY"); diff --git a/src/services/trialService.ts b/src/services/trialService.ts index 6e5cb6144..026d81161 100644 --- a/src/services/trialService.ts +++ b/src/services/trialService.ts @@ -69,7 +69,7 @@ export default class TrialService { (resBody) => ResponseSuccessRedirectToResource( resBody, - `/api/v1/trials/${trialId}/subscriptions`, + `/manage/api/v1/trials/${trialId}/subscriptions`, resBody ) );