16 lines
417 B
TypeScript
16 lines
417 B
TypeScript
|
|
import { Body, Controller, Post } from '@nestjs/common';
|
||
|
|
import { AuthService } from './auth.service';
|
||
|
|
import { ApiTags } from '@nestjs/swagger';
|
||
|
|
import { AuthLoginDTO } from './auth.dto';
|
||
|
|
|
||
|
|
@Controller()
|
||
|
|
export class AuthController {
|
||
|
|
constructor(private readonly authService: AuthService) {}
|
||
|
|
|
||
|
|
@ApiTags('Auth')
|
||
|
|
@Post('/login')
|
||
|
|
login(@Body() body: AuthLoginDTO) {
|
||
|
|
return this.authService.login(body);
|
||
|
|
}
|
||
|
|
}
|