mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 14:00:12 +02:00
22 lines
578 B
TypeScript
22 lines
578 B
TypeScript
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
|
import { AuthService } from './auth.service';
|
|
import { AuthLoginDto, AuthRegisterDto } from './dto';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
|
|
@ApiTags('auth')
|
|
@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);
|
|
}
|
|
}
|