Files
ApiCore/ApiCore-Backend/src/swarm-control/colony-swarm-control-checks.controller.ts
T
Nick SzaunigandClaude Sonnet 5 cdbdaedb8f feat: RBAC Phase 2b - Betrieb auf @RequirePermission umgestellt
Varroa, SwarmControl, Treatments, Feedings (+ jeweilige
Colony-Sub-Controller): @Roles(...) durch @RequirePermission(...)
ersetzt, ungeschuetzte GET-Routen mit :read-Rechten geschlossen.

Verifiziert: tsc, lint, e2e (varroa/swarm-control/treatments/feedings
einzeln gruen; volle Suite 158/159 gruen, 1 getrackter Skip).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-26 07:02:15 +02:00

18 lines
645 B
TypeScript

import { Controller, Get, Param } from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { RequirePermission } from '../auth/decorators/require-permission.decorator';
import { SwarmControlService } from './swarm-control.service';
@ApiTags('swarm-control-checks')
@ApiBearerAuth()
@Controller('colonies')
export class ColonySwarmControlChecksController {
constructor(private readonly swarmControlService: SwarmControlService) {}
@RequirePermission('swarm-control:read')
@Get(':id/swarm-control-checks')
findByColony(@Param('id') id: string) {
return this.swarmControlService.findByColony(id);
}
}