no message

This commit is contained in:
Kittapath 2024-02-07 12:01:12 +07:00
parent 551d2d70a4
commit 60f5203ff4
3 changed files with 25 additions and 25 deletions

View file

@ -99,12 +99,16 @@ export class PositionController extends Controller {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosLevelId");
}
// const checkPosExecutiveId = await this.posExecutiveRepository.findOne({
// where: { id: requestBody.posExecutiveId },
// });
// if (!checkPosExecutiveId) {
// throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosExecutiveId");
// }
if (requestBody.posExecutiveId != "") requestBody.posExecutiveId = null;
if (requestBody.posExecutiveId != null) {
const checkPosExecutiveId = await this.posExecutiveRepository.findOne({
where: { id: requestBody.posExecutiveId },
});
if (!checkPosExecutiveId) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosExecutiveId");
}
}
try {
posDict.createdUserId = request.user.sub;