no message
This commit is contained in:
parent
b6a485ba1f
commit
b2fd959162
1 changed files with 5 additions and 2 deletions
|
|
@ -128,14 +128,17 @@ export class PermissionController extends Controller {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลสิทธิ์");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลสิทธิ์");
|
||||||
}
|
}
|
||||||
const roleAttrData = await this.authRoleAttrRepo.find({
|
const roleAttrData = await this.authRoleAttrRepo.find({
|
||||||
select: ["authSysId"],
|
select: ["authSysId", "parentNode"],
|
||||||
where: { authRoleId: authRole.id, attrIsList: true },
|
where: { authRoleId: authRole.id, attrIsList: true },
|
||||||
});
|
});
|
||||||
|
const parentNode = roleAttrData.map((x) => x.parentNode);
|
||||||
|
const authSysId = roleAttrData.map((x) => x.authSysId);
|
||||||
|
const sysId = parentNode.concat(authSysId);
|
||||||
|
|
||||||
const getList = await this.authSysRepo.find({
|
const getList = await this.authSysRepo.find({
|
||||||
select: ["id", "parentId", "sysName", "sysDescription", "icon", "path", "order"],
|
select: ["id", "parentId", "sysName", "sysDescription", "icon", "path", "order"],
|
||||||
where: {
|
where: {
|
||||||
id: In(roleAttrData.map((x) => x.authSysId)),
|
id: In(sysId),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue