feat: add simple login logic
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Body, Controller, HttpCode, Post } from '@nestjs/common';
|
||||
import { LoginDTO } from './dtos/login.dto';
|
||||
import { AuthService } from './providers/auth.service';
|
||||
|
||||
@Controller('users')
|
||||
export class AuthController {
|
||||
constructor(
|
||||
/**
|
||||
* Inject Auth Service
|
||||
*/
|
||||
private readonly authService: AuthService,
|
||||
) {}
|
||||
|
||||
@Post('login')
|
||||
@HttpCode(200)
|
||||
public async logIn(@Body() loginDto: LoginDTO) {
|
||||
return await this.authService.logIn(loginDto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user