Skip to content

Instantly share code, notes, and snippets.

@saurabhpati
Created March 4, 2019 15:18
Show Gist options
  • Save saurabhpati/ce4d0742bbc4fcea0db89c7bb3dbcfe0 to your computer and use it in GitHub Desktop.
Save saurabhpati/ce4d0742bbc4fcea0db89c7bb3dbcfe0 to your computer and use it in GitHub Desktop.
Auth Controller
import { UserDto } from './dto/user.dto';
import { AuthService } from './auth.service';
import { Controller, Post, Body } from '@nestjs/common';
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {
}
@Post('login')
async signIn(@Body() userDto: UserDto) {
return this.authService.validateUser(userDto);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment