forked from CIDWA/cedetec_api_nest
Subir cambios a develop
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import { Body, Controller, Post } from '@nestjs/common';
|
||||
import { Body, Controller, Param, Post } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LoginMiembroDto } from './dto/loginMiembro.dto';
|
||||
import { RegistrarMiembroDto } from './dto/registrarMiembro.dto';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { ApiPostRegistro } from './auth.docs';
|
||||
import { jwtStrategy } from './jwt.strategy';
|
||||
|
||||
@Controller('auth')
|
||||
@ApiTags('auth')
|
||||
export class AuthController {
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
private authValidar: jwtStrategy,
|
||||
) /* @InjectRepository(Usuario) private usuarioRepository: Repository<Usuario> */ {}
|
||||
|
||||
@Post('registro')
|
||||
@@ -22,4 +24,9 @@ export class AuthController {
|
||||
login(@Body() LoginUsuario: LoginMiembroDto) {
|
||||
return this.authService.login(LoginUsuario);
|
||||
}
|
||||
|
||||
@Post('validate')
|
||||
validar(@Param() token: any) {
|
||||
return this.authValidar.validate
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user