From 358290e24a9aed4f587a2144e521b783764748ca Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Wed, 21 May 2025 14:15:56 +0700 Subject: [PATCH] sort --- src/controllers/ProfileSalaryTempController.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/ProfileSalaryTempController.ts b/src/controllers/ProfileSalaryTempController.ts index 86601526..f7c7f2ad 100644 --- a/src/controllers/ProfileSalaryTempController.ts +++ b/src/controllers/ProfileSalaryTempController.ts @@ -1494,14 +1494,13 @@ export class ProfileSalaryTempController extends Controller { * */ @Put("change/sort/{profileId}") - async Sort(@Path() profileId: string, @Body() requestBody: { id: string[] }) { + public async changeSortEditAll(@Path() profileId: string, @Body() requestBody: { id: string[] }) { const salary = await this.salaryRepo.find({ where: { profileId: profileId }, }); const sortLevel = salary.map((data) => ({ ...data, - id: data.id, order: requestBody.id.indexOf(data.id) + 1, }));