edit name null_

This commit is contained in:
kittapath 2025-03-10 09:52:50 +07:00
parent fb96c44753
commit ed111475f8
6 changed files with 171 additions and 135 deletions

View file

@ -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, "ไม่พบข้อมูลสิทธิ์");