mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 06:00:12 +02:00
20 lines
518 B
TypeScript
20 lines
518 B
TypeScript
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
|
import { AuthService } from './auth.service';
|
|
import { AuthLoginDto, AuthRegisterDto } from './dto';
|
|
|
|
@Controller('auth')
|
|
export class AuthController {
|
|
constructor(private authService: AuthService) {}
|
|
|
|
@Post('signup')
|
|
signup(@Body() dto: AuthRegisterDto) {
|
|
return this.authService.signup(dto);
|
|
}
|
|
|
|
@HttpCode(HttpStatus.OK)
|
|
@Post('signin')
|
|
signin(@Body() dto: AuthLoginDto) {
|
|
return this.authService.signin(dto);
|
|
}
|
|
}
|