From 765d48f6947e98a9f2623fda5b683de319bfbc29 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Mon, 7 Sep 2026 10:16:07 -0300 Subject: [PATCH] =?UTF-8?q?F3.1:=20exponer=20padres=20v=C3=A1lidos=20para?= =?UTF-8?q?=20cada=20nivel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset-master/inventory-structure.controller.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api-v3/src/asset-master/inventory-structure.controller.ts b/api-v3/src/asset-master/inventory-structure.controller.ts index 4f80d0b..41ca083 100644 --- a/api-v3/src/asset-master/inventory-structure.controller.ts +++ b/api-v3/src/asset-master/inventory-structure.controller.ts @@ -1,4 +1,4 @@ -import { Body, Controller, Get, Post, Req } from '@nestjs/common'; +import { Body, Controller, Get, Param, Post, Query, Req } from '@nestjs/common'; import { CurrentAuth } from '../auth/decorators/current-auth.decorator'; import { RequirePermissions } from '../authorization/decorators/require-permissions.decorator'; import type { AuthPrincipal, RequestWithContext } from '../common/http/request-context'; @@ -15,6 +15,15 @@ export class InventoryStructureController { return this.inventoryStructure.options(); } + @Get('parents/:kind') + @RequirePermissions('assets.read') + parents( + @Param('kind') kind: string, + @Query('search') search?: string, + ) { + return this.inventoryStructure.parents(kind, search); + } + @Post() @RequirePermissions('assets.create') create(