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