fix แก้ไขตำแหน่งทางการบริหาร
This commit is contained in:
parent
29f95d3ae2
commit
2972d6ef5e
1 changed files with 5 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import {
|
||||||
Get,
|
Get,
|
||||||
Example,
|
Example,
|
||||||
} from "tsoa";
|
} from "tsoa";
|
||||||
|
import { Not } from "typeorm"
|
||||||
import { AppDataSource } from "../database/data-source";
|
import { AppDataSource } from "../database/data-source";
|
||||||
import HttpSuccess from "../interfaces/http-success";
|
import HttpSuccess from "../interfaces/http-success";
|
||||||
import HttpStatusCode from "../interfaces/http-status";
|
import HttpStatusCode from "../interfaces/http-status";
|
||||||
|
|
@ -81,7 +82,10 @@ export class PosExecutiveController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkName = await this.posExecutiveRepository.findOne({
|
const checkName = await this.posExecutiveRepository.findOne({
|
||||||
where: { posExecutiveName: requestBody.posExecutiveName },
|
where: {
|
||||||
|
id: Not(id),
|
||||||
|
posExecutiveName: requestBody.posExecutiveName
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (checkName) {
|
if (checkName) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue