This commit is contained in:
Oscar
2026-06-02 16:22:53 +03:00
parent dc44cdd639
commit bc3e48bcad
37 changed files with 973 additions and 1894 deletions

View File

@@ -1,4 +1,4 @@
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
import { Body, Controller, Get, Post, Query, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { CurrentUser } from '../../common/decorators/current-user.decorator';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
@@ -13,17 +13,17 @@ export class LikesController {
constructor(private readonly likesService: LikesService) {}
@Post()
@ApiOperation({ summary: 'Like or dislike a user' })
createLike(
@CurrentUser('id') userId: string,
@Body() dto: CreateLikeDto,
) {
@ApiOperation({ summary: 'Like or dislike a profile' })
createLike(@CurrentUser('id') userId: string, @Body() dto: CreateLikeDto) {
return this.likesService.createLike(userId, dto);
}
@Get('matches')
@ApiOperation({ summary: 'Get my matches' })
getMyMatches(@CurrentUser('id') userId: string) {
return this.likesService.getMyMatches(userId);
@ApiOperation({ summary: 'Get matches for a profile' })
getMyMatches(
@CurrentUser('id') userId: string,
@Query('profileId') profileId: string,
) {
return this.likesService.getMyMatches(userId, profileId);
}
}