added guard jwt

This commit is contained in:
2026-02-23 18:16:17 -06:00
parent 472bfebb7a
commit 18b869d681
19 changed files with 112 additions and 53 deletions
+4 -1
View File
@@ -1,14 +1,17 @@
import { Controller, Get, Param } from '@nestjs/common';
import { Controller, Get, Param, UseGuards } from '@nestjs/common';
import { SancionService } from './sancion.service';
import { JwtAuthGuard } from 'src/user/jwt.guard';
@Controller('sancion')
export class SancionController {
constructor(private readonly sancionService: SancionService) {}
@UseGuards(JwtAuthGuard)
@Get()
find() {
return this.sancionService.find();
}
@UseGuards(JwtAuthGuard)
@Get(':id')
findOne(@Param('id') id: number) {
return this.sancionService.findOne(+id);