✨ feat(src/modules/greetings/greetings.controller.ts): обновляет ответы API для получения и создания фраз приветствия
✨ feat(src/modules/likes/likes.controller.ts): обновляет ответы API для создания лайка и получения совпадений ✨ feat(src/auth/auth.controller.ts): обновляет ответы API для регистрации, входа и выхода пользователя ✨ feat(src/modules/media/media.controller.ts): обновляет ответы API для загрузки и получения медиа ✨ feat(src/modules/users/users.controller.ts): обновляет ответы API для получения и управления пользователями ✨ feat(src/modules/dates/dto/dates-response.dto.ts): изменяет название свойства статуса даты на dateStatus ✨ feat(src/modules/cities/cities.controller.ts): обновляет ответы API для получения и создания городов и районов ✨ feat(src/modules/chat/chat.controller.ts): обновляет ответы API для создания и получения чатов и сообщений ✨ feat(src/modules/reports/reports.controller.ts): обновляет ответы API для создания и получения отчетов ✨ feat(src/modules/feed/feed.controller.ts): обновляет структуру ответа
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Body, Controller, Post, UseGuards } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiBody, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { ApiBearerAuth, ApiBody, ApiCreatedResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LoginDto } from './dto/login.dto';
|
||||
import { RefreshTokenDto } from './dto/refresh-token.dto';
|
||||
@@ -18,7 +18,7 @@ export class AuthController {
|
||||
@Public()
|
||||
@Post('register')
|
||||
@ApiOperation({ summary: 'Register new user' })
|
||||
@ApiResponse({ status: 201, type: TokensResponseDto })
|
||||
@ApiCreatedResponse({ type: TokensResponseDto })
|
||||
register(@Body() dto: RegisterDto) {
|
||||
return this.authService.register(dto);
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export class AuthController {
|
||||
@Public()
|
||||
@Post('login')
|
||||
@ApiOperation({ summary: 'Login with phone and password' })
|
||||
@ApiResponse({ status: 201, type: TokensResponseDto })
|
||||
@ApiCreatedResponse({ type: TokensResponseDto })
|
||||
login(@Body() dto: LoginDto) {
|
||||
return this.authService.login(dto);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ export class AuthController {
|
||||
@Post('logout')
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Logout current user' })
|
||||
@ApiResponse({ status: 201, type: MessageResponseDto })
|
||||
@ApiOkResponse({ type: MessageResponseDto })
|
||||
logout(@CurrentUser('id') userId: string) {
|
||||
return this.authService.logout(userId);
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export class AuthController {
|
||||
@Public()
|
||||
@Post('refresh')
|
||||
@ApiOperation({ summary: 'Refresh access token' })
|
||||
@ApiResponse({ status: 201, type: TokensResponseDto })
|
||||
@ApiCreatedResponse({ type: TokensResponseDto })
|
||||
refresh(@Body() dto: RefreshTokenDto) {
|
||||
return this.authService.refreshTokens(dto.refreshToken);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export class AuthController {
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Update FCM push token' })
|
||||
@ApiBody({ schema: { type: 'object', properties: { fcmToken: { type: 'string', example: 'firebase-token-abc123' } }, required: ['fcmToken'] } })
|
||||
@ApiResponse({ status: 201, type: MessageResponseDto })
|
||||
@ApiOkResponse({ type: MessageResponseDto })
|
||||
updateFcmToken(
|
||||
@CurrentUser('id') userId: string,
|
||||
@Body('fcmToken') fcmToken: string,
|
||||
|
||||
Reference in New Issue
Block a user