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