diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 67d39ed8..52acf7f0 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -4430,7 +4430,7 @@ export class OrganizationDotnetController extends Controller { typeCondition = {}; break; } - } else if (body.role === "OWNER") { + } else if (body.role === "OWNER" || body.role === "ROOT") { switch (body.reqNode) { case 0: typeCondition = { @@ -4516,12 +4516,6 @@ export class OrganizationDotnetController extends Controller { typeCondition = {}; break; } - } else if (body.role === "ROOT") { - typeCondition = { - orgRoot: { - ancestorDNA: body.nodeId, - }, - }; } let profile = await this.profileRepo.find({ @@ -4990,7 +4984,7 @@ export class OrganizationDotnetController extends Controller { }, ) { let typeCondition: any = {}; - if (body.role === "CHILD" || body.role === "PARENT" || body.role === "ROOT") { + if (body.role === "CHILD" || body.role === "PARENT") { switch (body.node) { case 0: typeCondition = { @@ -5034,7 +5028,7 @@ export class OrganizationDotnetController extends Controller { typeCondition = {}; break; } - } else if (body.role === "OWNER") { + } else if (body.role === "OWNER" || body.role === "ROOT") { switch (body.reqNode) { case 0: typeCondition = {