From 3eaa32ca844f0a367a139a112cb0404e9626deae Mon Sep 17 00:00:00 2001 From: Jaehyeon Kim Date: Fri, 19 Jul 2024 20:58:26 +0900 Subject: [PATCH] feat(be): add img base url for stage server (#1834) --- apps/backend/apps/admin/src/problem/problem.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/backend/apps/admin/src/problem/problem.service.ts b/apps/backend/apps/admin/src/problem/problem.service.ts index ace1169e62..ea880c5d2c 100644 --- a/apps/backend/apps/admin/src/problem/problem.service.ts +++ b/apps/backend/apps/admin/src/problem/problem.service.ts @@ -286,9 +286,14 @@ export class ProblemService { ) } + const baseUrlForImage = + this.config.get('APP_ENV') == 'stage' + ? 'https://stage.codedang.com/bucket' + : this.config.get('STORAGE_BUCKET_ENDPOINT_URL') + return { src: - this.config.get('STORAGE_BUCKET_ENDPOINT_URL') + + baseUrlForImage + '/' + this.config.get('MEDIA_BUCKET_NAME') + '/' +