listo validar token
This commit is contained in:
@@ -8,7 +8,13 @@ import {
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import { ApiBody, ApiOperation, ApiQuery, ApiTags } from '@nestjs/swagger';
|
||||
import {
|
||||
ApiBearerAuth,
|
||||
ApiBody,
|
||||
ApiOperation,
|
||||
ApiQuery,
|
||||
ApiTags,
|
||||
} from '@nestjs/swagger';
|
||||
import { Serealize } from '../interceptors/serialize.interceptor';
|
||||
import { CarreraProgramaService } from './carrera-programa.service';
|
||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
||||
@@ -22,11 +28,12 @@ export class CarreraProgramaController {
|
||||
constructor(private carreraProgramaService: CarreraProgramaService) {}
|
||||
|
||||
@Post()
|
||||
// @UseGuards(AuthGuard('jwt'))
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiOperation({
|
||||
description:
|
||||
'Endpoint que crea una asociación entre una carrera y un programa.',
|
||||
})
|
||||
@ApiBearerAuth('jwt')
|
||||
@ApiBody({
|
||||
description: 'Ambas variables son obligatorios.',
|
||||
examples: {
|
||||
@@ -41,11 +48,12 @@ export class CarreraProgramaController {
|
||||
}
|
||||
|
||||
@Delete()
|
||||
// @UseGuards(AuthGuard('jwt'))
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiOperation({
|
||||
description:
|
||||
'Endpoint que borra la asociación entre una carrera y un programa.',
|
||||
})
|
||||
@ApiBearerAuth('jwt')
|
||||
@ApiBody({
|
||||
description: 'Es obligatorio mandar la variable id_carrera_programa.',
|
||||
examples: { ejemplo: { value: { id_carrera_programa: 1 } } },
|
||||
|
||||
Reference in New Issue
Block a user