From 3a98b87ccfdba96bfc56602566031cc68b0768c0 Mon Sep 17 00:00:00 2001 From: z3n Date: Fri, 29 May 2026 13:46:00 +0000 Subject: [PATCH] =?UTF-8?q?fix(apis):=20r=C3=A9soudre=20le=20chemin=20abso?= =?UTF-8?q?lu=20avant=20sendFile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit res.sendFile() ne supporte pas les chemins relatifs — path.resolve() convertit ./docs-output/... en chemin absolu avant l'envoi. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- back/src/modules/apis/apis.controller.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/back/src/modules/apis/apis.controller.ts b/back/src/modules/apis/apis.controller.ts index 92c0bc6..66cc76f 100644 --- a/back/src/modules/apis/apis.controller.ts +++ b/back/src/modules/apis/apis.controller.ts @@ -52,7 +52,8 @@ export class ApisController { async getDocs(@Param('id') id: string, @Res() res: Response) { const entry = await this.apisService.findOneOrThrow(id); if (!entry.htmlPath) throw new NotFoundException('Documentation not generated yet'); - res.sendFile(entry.htmlPath); + const absolutePath = path.resolve(entry.htmlPath); + res.sendFile(absolutePath); } @Get(':id/yaml')