Created
March 4, 2019 15:18
-
-
Save saurabhpati/ce4d0742bbc4fcea0db89c7bb3dbcfe0 to your computer and use it in GitHub Desktop.
Auth Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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