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
+5 -1
View File
@@ -2,12 +2,16 @@ import { Controller, Get, UseGuards } from '@nestjs/common';
import { CarreraService } from './carrera.service';
import { Carrera } from './entities/carrera.entity';
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('carrera')
export class CarreraController {
constructor(private readonly carreraService: CarreraService) { }
@UseGuards(JwtAuthGuard)
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMINISTRADOR, Role.SUPER_ADMINISTRADOR,Role.ATENCION_USUARIOS,Role.SERVICIO_SOCIAL)
@Get()
findAll(): Promise<Carrera[]> {
return this.carreraService.findAll();