Skip to content
Snippets Groups Projects
auth.controller.ts 418 B
Newer Older
  • Learn to ignore specific revisions
  • Bastien DUMONT's avatar
    Bastien DUMONT committed
    import { Body, Controller, Post } from '@nestjs/common';
    
    import { ApiTags } from '@nestjs/swagger';
    
    import { AuthService } from './auth.service';
    
    import { LoginDto } from './login-dto';
    
    @ApiTags('auth')
    
    @Controller('auth')
    export class AuthController {
      constructor(private authService: AuthService) {}
    
      @Post('login')
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
      async login(@Body() loginDto: LoginDto) {
    
        return this.authService.login(loginDto);