From 101eabbac0ba711dbe3c2bce40b31007dde7fa50 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Fri, 18 Apr 2025 14:34:11 +0700 Subject: [PATCH] add api portfolio/user --- src/controllers/PortfolioController.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/controllers/PortfolioController.ts b/src/controllers/PortfolioController.ts index d027420..294b7f6 100644 --- a/src/controllers/PortfolioController.ts +++ b/src/controllers/PortfolioController.ts @@ -59,6 +59,30 @@ export class PortfolioController extends Controller { return new HttpSuccess(_portfolio); } + /** + * API list รายการผลงานสำหรับระบบประเมิน + * + * @summary list รายการผลงานสำหรับระบบประเมิน + * + */ + @Get("user") + async GetResultForEva(@Request() request: RequestWithUser) { + const _portfolio = await this.portfolioRepository.find({ + where: { createdUserId: request.user.sub }, + select: [ + "id", + "name", + "detail", + "createdAt", + "lastUpdatedAt", + "createdFullName", + "lastUpdateFullName", + ], + order: { createdAt: "DESC" }, + }); + return new HttpSuccess(_portfolio); + } + /** * API รายละเอียดรายการผลงาน *