From d4dffef0206409d38962e30f3c54f54feb604d07 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 10 Sep 2024 10:24:06 +0700 Subject: [PATCH] fix sort --- src/controllers/ProfileEmployeeController.ts | 2 +- src/controllers/ProfileEmployeeTempController.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 6cd1fbee..cf1e841c 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -3069,7 +3069,7 @@ export class ProfileEmployeeController extends Controller { const profileInformation = await this.informationHistoryRepository.find({ where: { profileEmployeeId: profileEmployeeId }, order: { - createdAt: "ASC", + createdAt: "DESC", }, }); return new HttpSuccess(profileInformation); diff --git a/src/controllers/ProfileEmployeeTempController.ts b/src/controllers/ProfileEmployeeTempController.ts index c3200eeb..96bea029 100644 --- a/src/controllers/ProfileEmployeeTempController.ts +++ b/src/controllers/ProfileEmployeeTempController.ts @@ -2951,7 +2951,7 @@ export class ProfileEmployeeTempController extends Controller { const profileInformation = await this.informationHistoryRepository.find({ where: { profileEmployeeId: profileEmployeeId }, order: { - createdAt: "ASC", + createdAt: "DESC", }, }); return new HttpSuccess(profileInformation);