F3.1: exponer padres válidos para cada nivel
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user