From cd1f416de01228161cf62d42b7140c8866745237 Mon Sep 17 00:00:00 2001 From: luch <32321690+luch1994@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:14:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98=20(#58)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/modules/survey/controllers/surveyUI.controller.ts | 4 ++-- .../surveyResponse/controllers/surveyResponseUI.controller.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/modules/survey/controllers/surveyUI.controller.ts b/server/src/modules/survey/controllers/surveyUI.controller.ts index 17b0c863..44a148ea 100644 --- a/server/src/modules/survey/controllers/surveyUI.controller.ts +++ b/server/src/modules/survey/controllers/surveyUI.controller.ts @@ -8,11 +8,11 @@ export class SurveyUIController { @Get('/') home(@Res() res: Response) { - res.sendFile(join(__dirname, 'src/../', 'public', 'management.html')); + res.sendFile(join(process.cwd(), 'public', 'management.html')); } @Get('/management/:surveyId') management(@Param('surveyId') surveyId: string, @Res() res: Response) { - res.sendFile(join(__dirname, 'src/../', 'public', 'management.html')); + res.sendFile(join(process.cwd(), 'public', 'management.html')); } } diff --git a/server/src/modules/surveyResponse/controllers/surveyResponseUI.controller.ts b/server/src/modules/surveyResponse/controllers/surveyResponseUI.controller.ts index 8bbe6159..e0c16784 100644 --- a/server/src/modules/surveyResponse/controllers/surveyResponseUI.controller.ts +++ b/server/src/modules/surveyResponse/controllers/surveyResponseUI.controller.ts @@ -8,6 +8,6 @@ export class SurveyResponseUIController { @Get('/render/:surveyPath') render(@Param('surveyPath') surveyPath: string, @Res() res: Response) { - res.sendFile(join(__dirname, 'src/../', 'public', 'render.html')); + res.sendFile(join(process.cwd(), 'public', 'render.html')); } }