feat(org-unit): scope structural reads to resource overview
This commit is contained in:
@@ -35,7 +35,7 @@ function buildTree(flatItems: FlatOrgUnit[], parentId: string | null = null): Or
|
||||
}
|
||||
|
||||
export const orgUnitRouter = createTRPCRouter({
|
||||
list: protectedProcedure
|
||||
list: resourceOverviewProcedure
|
||||
.input(
|
||||
z.object({
|
||||
level: z.number().int().min(5).max(7).optional(),
|
||||
@@ -54,7 +54,7 @@ export const orgUnitRouter = createTRPCRouter({
|
||||
});
|
||||
}),
|
||||
|
||||
getTree: protectedProcedure
|
||||
getTree: resourceOverviewProcedure
|
||||
.input(z.object({ isActive: z.boolean().optional() }).optional())
|
||||
.query(async ({ ctx, input }) => {
|
||||
const all = await ctx.db.orgUnit.findMany({
|
||||
|
||||
Reference in New Issue
Block a user