fix ลบรายการกลุ่มงานลูกจ้างประจำ
This commit is contained in:
parent
dcbda3b94e
commit
12ae8172d5
1 changed files with 5 additions and 4 deletions
|
|
@ -141,10 +141,11 @@ export class EmployeePosTypeController extends Controller {
|
||||||
async deleteType(@Path() id: string, @Request() request: RequestWithUser) {
|
async deleteType(@Path() id: string, @Request() request: RequestWithUser) {
|
||||||
let result: any;
|
let result: any;
|
||||||
try {
|
try {
|
||||||
result = await this.employeePosTypeRepository.findOne({
|
// result = await this.employeePosTypeRepository.findOne({
|
||||||
where: { id: id },
|
// where: { id: id },
|
||||||
});
|
// });
|
||||||
await this.employeePosTypeRepository.remove(result, { data: request });
|
// await this.employeePosTypeRepository.remove(result, { data: request });
|
||||||
|
result = await this.employeePosTypeRepository.delete({ id: id });
|
||||||
} catch {
|
} catch {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue