Skip to content

Commit

Permalink
Update API_KEY var name and OpenAPI url to generate trial system client
Browse files Browse the repository at this point in the history
  • Loading branch information
kin0992 committed Sep 24, 2024
1 parent 1800fb9 commit 167c056
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/081d98c37a116c9d842f31c54a2fe641680c5424/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",
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/services/trialService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class TrialService {
(resBody) =>
ResponseSuccessRedirectToResource(
resBody,
`/api/v1/trials/${trialId}/subscriptions`,
`/manage/api/v1/trials/${trialId}/subscriptions`,
resBody
)
);
Expand Down

0 comments on commit 167c056

Please sign in to comment.