Skip to content
Snippets Groups Projects
auth.controller.ts 547 B
Newer Older
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);

  @Post('resendEmail')
  async resendEmail(@Body() loginDto: LoginDto) {
    return this.authService.resendEmail(loginDto);
  }