feat(src/modules/cities/cities.controller.ts): добавляет ответы API для получения всех городов и районов

 feat(src/modules/chat/chat.controller.ts): добавляет ответы API для создания чата и получения сообщений

 feat(src/modules/greetings/greetings.controller.ts): добавляет ответы API для получения и создания приветствий

 feat(src/modules/likes/likes.controller.ts): добавляет ответы API для создания лайков и получения совпадений

 feat(src/modules/reports/reports.controller.ts): добавляет ответы API для создания и получения отчетов

 feat(src/modules/feed/feed.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/tags/tags.controller.ts): добавляет ответы API для получения и создания тегов

 feat(src/modules/profiles/profiles.controller.ts): добавляет ответы API для управления профилями пользователей

 feat(src/modules/dates/dates.controller.ts): добавляет ответы API для создания и получения встреч
This commit is contained in:
Oscar
2026-06-08 14:22:50 +03:00
parent bc3e48bcad
commit 102b6b4026
24 changed files with 598 additions and 12 deletions

View File

@@ -0,0 +1,21 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class LikeDto {
@ApiProperty() id: string;
@ApiProperty() sourceProfileId: string;
@ApiProperty() targetProfileId: string;
@ApiProperty({ enum: ['like', 'dislike'] }) type: string;
@ApiProperty() createdAt: string;
}
export class MatchDto {
@ApiProperty() id: string;
@ApiProperty() profile1Id: string;
@ApiProperty() profile2Id: string;
@ApiProperty() createdAt: string;
}
export class CreateLikeResponseDto {
@ApiProperty({ type: LikeDto }) like: LikeDto;
@ApiPropertyOptional({ type: MatchDto, nullable: true }) match: MatchDto | null;
}

View File

@@ -1,8 +1,9 @@
import { Body, Controller, Get, Post, Query, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiBearerAuth, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { CurrentUser } from '../../common/decorators/current-user.decorator';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
import { CreateLikeDto } from './dto/create-like.dto';
import { CreateLikeResponseDto, MatchDto } from './dto/likes-response.dto';
import { LikesService } from './likes.service';
@ApiTags('likes')
@@ -14,12 +15,14 @@ export class LikesController {
@Post()
@ApiOperation({ summary: 'Like or dislike a profile' })
@ApiResponse({ status: 201, type: CreateLikeResponseDto })
createLike(@CurrentUser('id') userId: string, @Body() dto: CreateLikeDto) {
return this.likesService.createLike(userId, dto);
}
@Get('matches')
@ApiOperation({ summary: 'Get matches for a profile' })
@ApiResponse({ status: 200, type: [MatchDto] })
getMyMatches(
@CurrentUser('id') userId: string,
@Query('profileId') profileId: string,