From 83406751c780ca5ff5819e0880b7bdf2b4445b19 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 14 Mar 2024 10:07:22 +0700 Subject: [PATCH] fix --- src/controllers/ProfileAbilityController.ts | 6 +++--- src/controllers/ProfileAssessmentsController.ts | 6 +++--- src/controllers/ProfileEducationsController.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/controllers/ProfileAbilityController.ts b/src/controllers/ProfileAbilityController.ts index 6d7cafb5..69c0a0fa 100644 --- a/src/controllers/ProfileAbilityController.ts +++ b/src/controllers/ProfileAbilityController.ts @@ -142,7 +142,7 @@ export class ProfileAbilityController extends Controller { await this.profileAbilityRepo.save(data); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } @Patch("{abilityId}") @@ -168,7 +168,7 @@ export class ProfileAbilityController extends Controller { this.profileAbilityHistoryRepo.save(history), ]); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } @Delete("{abilityId}") @@ -182,6 +182,6 @@ export class ProfileAbilityController extends Controller { if (result.affected && result.affected <= 0) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } } diff --git a/src/controllers/ProfileAssessmentsController.ts b/src/controllers/ProfileAssessmentsController.ts index 77126f9f..73ca5f05 100644 --- a/src/controllers/ProfileAssessmentsController.ts +++ b/src/controllers/ProfileAssessmentsController.ts @@ -155,7 +155,7 @@ export class ProfileAssessmentsController extends Controller { await this.profileAssessmentsRepository.save(data); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } @Patch("{assessmentId}") @@ -180,7 +180,7 @@ export class ProfileAssessmentsController extends Controller { this.profileAssessmentsRepository.save(record), this.profileAssessmentsHistoryRepository.save(history), ]); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } @Delete("{assessmentId}") @@ -194,6 +194,6 @@ export class ProfileAssessmentsController extends Controller { if (result.affected && result.affected <= 0) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } } diff --git a/src/controllers/ProfileEducationsController.ts b/src/controllers/ProfileEducationsController.ts index 5a028e29..c12cf4bd 100644 --- a/src/controllers/ProfileEducationsController.ts +++ b/src/controllers/ProfileEducationsController.ts @@ -184,7 +184,7 @@ export class ProfileEducationsController extends Controller { await this.profileEducationRepo.save(data); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } @Patch("{educationId}") @@ -210,7 +210,7 @@ export class ProfileEducationsController extends Controller { this.profileEducationHistoryRepo.save(history), ]); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } @Delete("{educationId}") @@ -224,6 +224,6 @@ export class ProfileEducationsController extends Controller { if (result.affected && result.affected <= 0) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); - return this.setStatus(HttpStatus.NO_CONTENT); + return new HttpSuccess(); } }