added all roles
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user