Skip to content
Snippets Groups Projects
auth.controller.ts 403 B
Newer Older
  • Learn to ignore specific revisions
  • import { Controller, Post, Body } from '@nestjs/common';
    
    import { AuthService } from './auth.service';
    
    import { LoginDto } from './login-dto';
    
    
    @Controller('auth')
    export class AuthController {
      constructor(private authService: AuthService) {}
    
      @Post('login')
    
      async login(@Body() loginDto: LoginDto): Promise<{ username; name; surname; token }> {
    
        return this.authService.login(loginDto);