15 lines
615 B
TypeScript
15 lines
615 B
TypeScript
import { Controller, Get, Param, ParseUUIDPipe } from '@nestjs/common';
|
|
import { RequirePermissions } from '../authorization/decorators/require-permissions.decorator';
|
|
import { InventoryFamilyCatalogService } from './inventory-family-catalog.service';
|
|
|
|
@Controller('inventory-families')
|
|
export class InventoryFamilyCatalogController {
|
|
constructor(private readonly families: InventoryFamilyCatalogService) {}
|
|
|
|
@Get(':familyId/findings')
|
|
@RequirePermissions('assets.read')
|
|
findings(@Param('familyId', new ParseUUIDPipe({ version: '4' })) familyId: string) {
|
|
return this.families.findings(familyId);
|
|
}
|
|
}
|