From 8f6517a6ab64632d2b3a4b97bf6332dabe10227b Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Wed, 7 Feb 2024 11:03:12 +0700 Subject: [PATCH] fix ORG_061 --- src/controllers/EducationLevelController.ts | 4 ++-- src/controllers/PositionController.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/EducationLevelController.ts b/src/controllers/EducationLevelController.ts index cbdb68d5..a8ba9cbe 100644 --- a/src/controllers/EducationLevelController.ts +++ b/src/controllers/EducationLevelController.ts @@ -135,7 +135,7 @@ export class EducationLevelController extends Controller { async detailEducationLevel(@Path() id: string) { const educationLevel = await this.educationLevelRepository.findOne({ where: { id }, - select: ["id", "name", "rank"], + select: ["id", "name", "rank", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"], }); if (!educationLevel) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); @@ -156,7 +156,7 @@ export class EducationLevelController extends Controller { @Get() async listEducationLevel() { const educationLevel = await this.educationLevelRepository.find({ - select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"], + select: ["id", "name","rank", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"], order: { createdAt: "ASC" }, }); diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index 13929b56..b378221b 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -492,7 +492,7 @@ export class PositionController extends Controller { posMaster.orgRevisionId = orgRoot.orgRevisionId; } - posMaster.createdUserId = request.user.sub; + posMaster.createdUserId = request.user.sub; //สงสัยว่าทำให้ bug แก้ไขไม่ได้ posMaster.createdFullName = request.user.name; posMaster.lastUpdateUserId = request.user.sub; posMaster.lastUpdateFullName = request.user.name;