diff --git a/src/controllers/BloodGroupController.ts b/src/controllers/BloodGroupController.ts index 550400c2..bffb007d 100644 --- a/src/controllers/BloodGroupController.ts +++ b/src/controllers/BloodGroupController.ts @@ -127,7 +127,7 @@ export class BloodGroupController extends Controller { select: ["id", "name"], }); if (!bloodGroup) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลกรุ๊ปเลือดนี้"); } return new HttpSuccess(bloodGroup); } diff --git a/src/controllers/EducationLevelController.ts b/src/controllers/EducationLevelController.ts index 217b8f12..67da2294 100644 --- a/src/controllers/EducationLevelController.ts +++ b/src/controllers/EducationLevelController.ts @@ -134,7 +134,7 @@ export class EducationLevelController extends Controller { ], }); if (!educationLevel) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลระดับการศึกษานี้"); } return new HttpSuccess(educationLevel); } diff --git a/src/controllers/GenderController.ts b/src/controllers/GenderController.ts index 6959e040..841380c1 100644 --- a/src/controllers/GenderController.ts +++ b/src/controllers/GenderController.ts @@ -39,7 +39,6 @@ export class GenderController extends Controller { */ @Get() async GetResult() { - console.log("asds"); const _gender = await this.genderRepository.find({ select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"], order: { createdAt: "ASC" }, @@ -64,7 +63,7 @@ export class GenderController extends Controller { select: ["id", "name"], }); if (!_gender) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพทางเพศนี้"); } return new HttpSuccess(_gender); @@ -84,7 +83,7 @@ export class GenderController extends Controller { ) { const _gender = Object.assign(new Gender(), requestBody); if (!_gender) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพทางเพศนี้"); } const checkName = await this.genderRepository.findOne({ @@ -119,7 +118,7 @@ export class GenderController extends Controller { ) { const _gender = await this.genderRepository.findOne({ where: { id: id } }); if (!_gender) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเพศนี้"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพทางเพศนี้"); } const checkName = await this.genderRepository.findOne({ where: { id: Not(id), name: requestBody.name }, @@ -148,7 +147,7 @@ export class GenderController extends Controller { where: { id: id }, }); if (!_delGender) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลเพศนี้"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพทางเพศนี้"); } await this.genderRepository.delete(_delGender.id); return new HttpSuccess(); diff --git a/src/controllers/OrgChild1Controller.ts b/src/controllers/OrgChild1Controller.ts index 598f6dfc..da664b33 100644 --- a/src/controllers/OrgChild1Controller.ts +++ b/src/controllers/OrgChild1Controller.ts @@ -58,7 +58,7 @@ export class OrgChild1Controller { relations: ["orgRoot"], }); if (!orgChild1) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล โครงสร้างระดับ 1"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงสร้างระดับ 1"); } const getOrgChild1 = { orgChild1Id: orgChild1.id, diff --git a/src/controllers/OrgChild2Controller.ts b/src/controllers/OrgChild2Controller.ts index 8dc58922..01355826 100644 --- a/src/controllers/OrgChild2Controller.ts +++ b/src/controllers/OrgChild2Controller.ts @@ -60,7 +60,7 @@ export class OrgChild2Controller extends Controller { relations: ["orgRoot", "orgChild1"], }); if (!orgChild2) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล โครงสร้างระดับ 2"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงสร้างระดับ 2"); } const getOrgChild2 = { orgChild2Id: orgChild2.id, diff --git a/src/controllers/OrgChild3Controller.ts b/src/controllers/OrgChild3Controller.ts index 87937fab..cf95a5bb 100644 --- a/src/controllers/OrgChild3Controller.ts +++ b/src/controllers/OrgChild3Controller.ts @@ -56,7 +56,7 @@ export class OrgChild3Controller { relations: ["orgRoot", "orgChild1", "orgChild2"], }); if (!orgChild3) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล โครงสร้างระดับ 3"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงสร้างระดับ 3"); } const getOrgChild3 = { orgChild3Id: orgChild3.id, diff --git a/src/controllers/OrgChild4Controller.ts b/src/controllers/OrgChild4Controller.ts index e6ac25bd..ad21c3be 100644 --- a/src/controllers/OrgChild4Controller.ts +++ b/src/controllers/OrgChild4Controller.ts @@ -58,7 +58,7 @@ export class OrgChild4Controller extends Controller { relations: ["orgRoot", "orgChild1", "orgChild2", "orgChild3"], }); if (!orgChild4) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล โครงสร้างระดับ 4"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงสร้างระดับ 4"); } const getOrgChild4 = { orgChild4Id: orgChild4.id, diff --git a/src/controllers/OrgRootController.ts b/src/controllers/OrgRootController.ts index 17dd2a67..8b11eec0 100644 --- a/src/controllers/OrgRootController.ts +++ b/src/controllers/OrgRootController.ts @@ -51,7 +51,7 @@ export class OrgRootController extends Controller { async GetRoot(@Path() id: string) { const orgRoot = await this.orgRootRepository.findOne({ where: { id } }); if (!orgRoot) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล โครงสร้างระดับ Root"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงสร้างระดับ Root นี้"); } const getOrgRoot = { orgRootId: orgRoot.id, diff --git a/src/controllers/PositionController.ts b/src/controllers/PositionController.ts index 444fa865..8c383207 100644 --- a/src/controllers/PositionController.ts +++ b/src/controllers/PositionController.ts @@ -89,7 +89,7 @@ export class PositionController extends Controller { where: { id: posDict.posTypeId }, }); if (!checkPosTypeId) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosTypeId"); + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่ง"); } const checkPosLevelId = await this.posLevelRepository.findOne({