fix api role
This commit is contained in:
parent
543ef19664
commit
ba065b4299
4 changed files with 71 additions and 20 deletions
|
|
@ -31,9 +31,9 @@ export class AuthRoleAttrController extends Controller {
|
|||
@Get("list")
|
||||
public async listAuthRoleAttr() {
|
||||
const getList = await this.authRoleAttrRepo.find();
|
||||
if (!getList || getList.length === 0) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
// if (!getList || getList.length === 0) {
|
||||
// throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
// }
|
||||
return new HttpSuccess(getList);
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ export class AuthRoleAttrController extends Controller {
|
|||
|
||||
await this.authRoleAttrRepo.save(data);
|
||||
|
||||
return new HttpSuccess();
|
||||
return new HttpSuccess(data.id);
|
||||
}
|
||||
|
||||
@Patch("{roleAttrId}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue