cron job Revision

This commit is contained in:
AdisakKanthawilang 2024-02-07 15:45:13 +07:00
parent 148fa2c81c
commit 1abf623924
3 changed files with 50 additions and 10 deletions

View file

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