logins en auth
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Body, Controller, Post } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
import { AuthLoginOperadorDto } from './dto/auth-login-operador.dto';
|
||||
import { AuthLoginUsuarioDto } from './dto/auth-login-usuario.dto';
|
||||
|
||||
@Controller('auth')
|
||||
export class AuthController {}
|
||||
export class AuthController {
|
||||
constructor(private authService: AuthService) {}
|
||||
|
||||
@Post('login_operador')
|
||||
loginOperador(@Body() body: AuthLoginOperadorDto) {
|
||||
return this.authService.loginOperador(body.operador, body.password);
|
||||
}
|
||||
|
||||
@Post('login_usuario')
|
||||
loginUsuario(@Body() body: AuthLoginUsuarioDto) {
|
||||
return this.authService.loginUsuario(body.usuario, body.password);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user