import { Body , Controller , Post } from '@nestjs/common' ; import { ApiTags } from "@nestjs/swagger" ; import { CreateUserDto } from "../users/dto/create-user.dto" ; import { AuthService } from "./auth.service" ; @ ApiTags ( 'Авторизация' ) @ Controller ( 'auth' ) export class AuthController { constructor ( private authService ) { } @ Post ( '/login' ) login ( @ Body ( ) userDto ) { return this . authService . login ( userDto ) ; } @ Post ( '/registration' ) registration ( @ Body ( ) userDto ) { return this . authService . registration ( userDto ) ; } }