เช็คเงื่อนไขการลบ
This commit is contained in:
parent
c75c3ef651
commit
8348c32e5b
17 changed files with 54 additions and 57 deletions
|
|
@ -153,7 +153,7 @@ export class ProfileOtherController extends Controller {
|
|||
|
||||
const result = await this.otherRepository.delete({ id: otherId });
|
||||
|
||||
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