From 6e88a050f79bad9981021efacd8ccac1e40ca0c7 Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:18:49 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97?= =?UTF-8?q?=E0=B8=B6=E0=B8=81=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9?= =?UTF-8?q?=E0=B8=A5=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95?= =?UTF-8?q?=E0=B8=B4=E0=B8=81=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileAbilityController.ts | 2 +- src/controllers/ProfileAssessmentsController.ts | 2 +- src/controllers/ProfileEducationsController.ts | 2 +- src/controllers/ProfileInformationController.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/ProfileAbilityController.ts b/src/controllers/ProfileAbilityController.ts index 69c0a0fa..df6fdd0c 100644 --- a/src/controllers/ProfileAbilityController.ts +++ b/src/controllers/ProfileAbilityController.ts @@ -156,8 +156,8 @@ export class ProfileAbilityController extends Controller { const history = new ProfileAbilityHistory(); + Object.assign(history, { ...record, id: undefined }); Object.assign(record, requestBody); - Object.assign(history, { ...requestBody, id: undefined }); history.profileAbilityId = abilityId; history.lastUpdateFullName = req.user.name; diff --git a/src/controllers/ProfileAssessmentsController.ts b/src/controllers/ProfileAssessmentsController.ts index 73ca5f05..992770c8 100644 --- a/src/controllers/ProfileAssessmentsController.ts +++ b/src/controllers/ProfileAssessmentsController.ts @@ -169,8 +169,8 @@ export class ProfileAssessmentsController extends Controller { const history = new ProfileAssessmentHistory(); + Object.assign(history, { ...record, id: undefined }); Object.assign(record, requestBody); - Object.assign(history, { ...requestBody, id: undefined }); history.profileAssessmentId = assessmentId; history.lastUpdateFullName = req.user.name; diff --git a/src/controllers/ProfileEducationsController.ts b/src/controllers/ProfileEducationsController.ts index 0a31993e..dffba92d 100644 --- a/src/controllers/ProfileEducationsController.ts +++ b/src/controllers/ProfileEducationsController.ts @@ -201,8 +201,8 @@ export class ProfileEducationsController extends Controller { const history = new ProfileEducationHistory(); + Object.assign(history, { ...record, id: undefined }); Object.assign(record, requestBody); - Object.assign(history, { ...requestBody, id: undefined }); history.profileEducationId = educationId; history.lastUpdateFullName = req.user.name; diff --git a/src/controllers/ProfileInformationController.ts b/src/controllers/ProfileInformationController.ts index 892eb4e0..816bb0c9 100644 --- a/src/controllers/ProfileInformationController.ts +++ b/src/controllers/ProfileInformationController.ts @@ -157,8 +157,8 @@ export class ProfileInformationController extends Controller { console.log(requestBody); + Object.assign(history, { ...record, id: undefined }); Object.assign(record, requestBody); - Object.assign(history, { ...requestBody, id: undefined }); history.profileInformationId = informationId; history.lastUpdateFullName = req.user.name;