เช็คเงื่อนไขการลบ
This commit is contained in:
parent
c75c3ef651
commit
8348c32e5b
17 changed files with 54 additions and 57 deletions
|
|
@ -185,7 +185,7 @@ export class ProfileDutyController extends Controller {
|
|||
|
||||
const result = await this.dutyRepository.delete({ id: dutyId });
|
||||
|
||||
if (result.affected && result.affected <= 0) {
|
||||
if (result.affected == undefined || result.affected <= 0) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue