upd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user