added guard jwt
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
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';
|
||||
|
||||
@Controller('carrera')
|
||||
export class CarreraController {
|
||||
constructor(private readonly carreraService: CarreraService) {}
|
||||
constructor(private readonly carreraService: CarreraService) { }
|
||||
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get()
|
||||
findAll(): Promise<Carrera[]> {
|
||||
return this.carreraService.findAll();
|
||||
|
||||
Reference in New Issue
Block a user