edit name null_
This commit is contained in:
parent
fb96c44753
commit
ed111475f8
6 changed files with 171 additions and 135 deletions
|
|
@ -87,11 +87,11 @@ export class AuthRoleController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateAddAuthRole,
|
||||
) {
|
||||
let NULL_: any = null;
|
||||
let _null: any = null;
|
||||
let getDetail;
|
||||
|
||||
if (body.authRoleId == "") {
|
||||
body.authRoleId = NULL_;
|
||||
body.authRoleId = _null;
|
||||
} else {
|
||||
getDetail = await this.authRoleRepo.findOneBy({ id: body.authRoleId });
|
||||
if (!getDetail) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลสิทธิ์");
|
||||
|
|
@ -131,11 +131,11 @@ export class AuthRoleController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateAddAuthRole,
|
||||
) {
|
||||
let NULL_: any = null;
|
||||
let _null: any = null;
|
||||
let getDetail;
|
||||
|
||||
if (body.authRoleId == "") {
|
||||
body.authRoleId = NULL_;
|
||||
body.authRoleId = _null;
|
||||
} else {
|
||||
getDetail = await this.authRoleRepo.findOneBy({ id: body.authRoleId });
|
||||
if (!getDetail) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลสิทธิ์");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue