From a3bd044509c1881b74eb6648cf70d25d42a02f29 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sun, 1 Dec 2024 10:01:00 +0100 Subject: [PATCH] Refactor: adapt the api logic to use frontendPath environment variable --- api/src/app.module.ts | 2 +- api/src/config/index.ts | 1 - api/src/config/types.ts | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/api/src/app.module.ts b/api/src/app.module.ts index 9c90f471..2042b6c8 100644 --- a/api/src/app.module.ts +++ b/api/src/app.module.ts @@ -75,7 +75,7 @@ const i18nOptions: I18nOptions = { options: { context: { appName: config.parameters.appName, - appUrl: config.parameters.appUrl, + appUrl: config.frontendPath, }, }, }, diff --git a/api/src/config/index.ts b/api/src/config/index.ts index ccc24576..8829551a 100644 --- a/api/src/config/index.ts +++ b/api/src/config/index.ts @@ -112,7 +112,6 @@ export const config: Config = { ? Number(process.env.UPLOAD_MAX_SIZE_IN_BYTES) : 2000000, appName: 'Hexabot.ai', - appUrl: 'http://localhost:8081', }, pagination: { limit: 10, diff --git a/api/src/config/types.ts b/api/src/config/types.ts index 27f05ea7..5f0f340b 100644 --- a/api/src/config/types.ts +++ b/api/src/config/types.ts @@ -81,7 +81,6 @@ export type Config = { storageMode: 'disk' | 'memory'; maxUploadSize: number; appName: string; - appUrl: string; }; pagination: { limit: number;