added all roles

This commit is contained in:
2026-03-02 14:49:15 -06:00
parent 8aa0eab353
commit 0323c93ca3
22 changed files with 233 additions and 92 deletions
+6 -2
View File
@@ -1,12 +1,16 @@
import { Controller, Get, UseGuards } from '@nestjs/common';
import { ServicioService } from './servicio.service';
import { JwtAuthGuard } from 'src/user/jwt.guard';
import { RolesGuard } from 'src/roles.guard';
import { Roles } from 'src/roles.decorator';
import { Role } from 'src/role.enum';
@Controller('servicio')
export class ServicioController {
constructor(private readonly servicioService: ServicioService) {}
constructor(private readonly servicioService: ServicioService) { }
@UseGuards(JwtAuthGuard)
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR)
@Get()
findAll() {
return this.servicioService.findAll();