fix แก้ไขตำแหน่งทางการบริหาร

This commit is contained in:
Bright 2024-03-18 09:50:23 +07:00
parent 29f95d3ae2
commit 2972d6ef5e

View file

@ -14,6 +14,7 @@ import {
Get,
Example,
} from "tsoa";
import { Not } from "typeorm"
import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success";
import HttpStatusCode from "../interfaces/http-status";
@ -81,7 +82,10 @@ export class PosExecutiveController extends Controller {
}
const checkName = await this.posExecutiveRepository.findOne({
where: { posExecutiveName: requestBody.posExecutiveName },
where: {
id: Not(id),
posExecutiveName: requestBody.posExecutiveName
},
});
if (checkName) {