แก้ 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

@ -66,7 +66,7 @@ export class PosLevelController extends Controller {
if (!chkPosTypeId) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"ไม่พบข้อมูล posTypeId ไอดีนี้ : " + requestBody.posTypeId,
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
);
}
@ -118,7 +118,7 @@ export class PosLevelController extends Controller {
) {
const posLevel = await this.posLevelRepository.findOne({ where: { id } });
if (!posLevel) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลระดับตำแหน่ง");
}
const chkPosTypeId = await this.posTypeRepository.findOne({
@ -129,7 +129,7 @@ export class PosLevelController extends Controller {
if (!chkPosTypeId) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"ไม่พบข้อมูล posTypeId ไอดีนี้ : " + requestBody.posTypeId,
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
);
}
@ -172,7 +172,7 @@ export class PosLevelController extends Controller {
async deleteLevel(@Path() id: string) {
const delPosLevel = await this.posLevelRepository.findOne({ where: { id } });
if (!delPosLevel) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลระดับตำแหน่งนี้");
}
await this.posLevelRepository.remove(delPosLevel);
return new HttpSuccess();
@ -204,7 +204,7 @@ export class PosLevelController extends Controller {
where: { id: id },
});
if (!getPosType) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่งนี้");
}
const mapPosLevel = {