This commit is contained in:
AdisakKanthawilang 2024-03-14 10:07:22 +07:00
parent 4a3cc7a330
commit 83406751c7
3 changed files with 9 additions and 9 deletions

View file

@ -142,7 +142,7 @@ export class ProfileAbilityController extends Controller {
await this.profileAbilityRepo.save(data); await this.profileAbilityRepo.save(data);
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
@Patch("{abilityId}") @Patch("{abilityId}")
@ -168,7 +168,7 @@ export class ProfileAbilityController extends Controller {
this.profileAbilityHistoryRepo.save(history), this.profileAbilityHistoryRepo.save(history),
]); ]);
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
@Delete("{abilityId}") @Delete("{abilityId}")
@ -182,6 +182,6 @@ export class ProfileAbilityController extends Controller {
if (result.affected && result.affected <= 0) if (result.affected && result.affected <= 0)
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
} }

View file

@ -155,7 +155,7 @@ export class ProfileAssessmentsController extends Controller {
await this.profileAssessmentsRepository.save(data); await this.profileAssessmentsRepository.save(data);
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
@Patch("{assessmentId}") @Patch("{assessmentId}")
@ -180,7 +180,7 @@ export class ProfileAssessmentsController extends Controller {
this.profileAssessmentsRepository.save(record), this.profileAssessmentsRepository.save(record),
this.profileAssessmentsHistoryRepository.save(history), this.profileAssessmentsHistoryRepository.save(history),
]); ]);
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
@Delete("{assessmentId}") @Delete("{assessmentId}")
@ -194,6 +194,6 @@ export class ProfileAssessmentsController extends Controller {
if (result.affected && result.affected <= 0) if (result.affected && result.affected <= 0)
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
} }

View file

@ -184,7 +184,7 @@ export class ProfileEducationsController extends Controller {
await this.profileEducationRepo.save(data); await this.profileEducationRepo.save(data);
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
@Patch("{educationId}") @Patch("{educationId}")
@ -210,7 +210,7 @@ export class ProfileEducationsController extends Controller {
this.profileEducationHistoryRepo.save(history), this.profileEducationHistoryRepo.save(history),
]); ]);
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
@Delete("{educationId}") @Delete("{educationId}")
@ -224,6 +224,6 @@ export class ProfileEducationsController extends Controller {
if (result.affected && result.affected <= 0) if (result.affected && result.affected <= 0)
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
return this.setStatus(HttpStatus.NO_CONTENT); return new HttpSuccess();
} }
} }