super_admin unvalidate
This commit is contained in:
parent
99255ff36b
commit
e312e43eaa
1 changed files with 13 additions and 1 deletions
|
|
@ -589,12 +589,24 @@ export class OrganizationController extends Controller {
|
|||
*/
|
||||
@Get("{id}")
|
||||
async detail(@Path() id: string, @Request() request: RequestWithUser) {
|
||||
let _data = {
|
||||
root: null,
|
||||
child1: null,
|
||||
child2: null,
|
||||
child3: null,
|
||||
child4: null,
|
||||
}
|
||||
|
||||
if (!request.user.role.includes('SUPER_ADMIN')) {
|
||||
console.log("none super_admin");
|
||||
|
||||
_data = await new permission().PermissionOrgList(request, "SYS_ORG");
|
||||
}
|
||||
const orgRevision = await this.orgRevisionRepository.findOne({ where: { id } });
|
||||
if (!orgRevision) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
|
||||
let _data = await new permission().PermissionOrgList(request, "SYS_ORG");
|
||||
const orgRootData = await AppDataSource.getRepository(OrgRoot)
|
||||
.createQueryBuilder("orgRoot")
|
||||
.where("orgRoot.orgRevisionId = :id", { id })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue