Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import { Body, Controller, HttpStatus, Post } from '@nestjs/common'; import { ApiBody, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { UserService } from '../services/user.service'; import { AuthUserDto, RegisterAuthUserRequestDto } from '../shared/user.dto'; @ApiTags('Auth Account') @Controller({ path: 'api/auth/users' }) export class UserApiController { constructor(private readonly userService: UserService) {} @Post() @ApiOperation({ operationId: 'registerAuthUser', }) @ApiBody({ description: RegisterAuthUserRequestDto.name, type: RegisterAuthUserRequestDto, }) @ApiResponse({ status: HttpStatus.CREATED, description: AuthUserDto.name, type: AuthUserDto, }) registerAuthUser(@Body() payload: RegisterAuthUserRequestDto): Promise<AuthUserDto> { return this.userService.register(payload); } } |