แก้ caption ไอดี

This commit is contained in:
Bright 2024-02-28 14:00:38 +07:00
parent c1599e9d41
commit da6f901b81
10 changed files with 27 additions and 117 deletions

View file

@ -129,7 +129,7 @@ export class PrefixController extends Controller {
) {
const _prefix = await this.prefixRepository.findOne({ where: { id: id } });
if (!_prefix) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตามไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำนำหน้าชื่อนี้");
}
const checkName = await this.prefixRepository.findOne({
where: { id: Not(id), name: requestBody.name },
@ -162,7 +162,7 @@ export class PrefixController extends Controller {
where: { id: id },
});
if (!_delPrefix) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตามไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำนำหน้าชื่อนี้");
}
try {
await this.prefixRepository.delete(_delPrefix.id);