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) {
|
||||
let result: any;
|
||||
try {
|
||||
result = await this.employeePosTypeRepository.findOne({
|
||||
where: { id: id },
|
||||
});
|
||||
await this.employeePosTypeRepository.remove(result, { data: request });
|
||||
// result = await this.employeePosTypeRepository.findOne({
|
||||
// where: { id: id },
|
||||
// });
|
||||
// await this.employeePosTypeRepository.remove(result, { data: request });
|
||||
result = await this.employeePosTypeRepository.delete({ id: id });
|
||||
} catch {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.NOT_FOUND,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue