first commit
This commit is contained in:
23
src/modules/feed/feed.controller.ts
Normal file
23
src/modules/feed/feed.controller.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Controller, Get, 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';
|
||||
import { FeedFilterDto } from './dto/feed-filter.dto';
|
||||
import { FeedService } from './feed.service';
|
||||
|
||||
@ApiTags('feed')
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Controller('feed')
|
||||
export class FeedController {
|
||||
constructor(private readonly feedService: FeedService) {}
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'Get filtered feed of profiles' })
|
||||
getFeed(
|
||||
@CurrentUser('id') userId: string,
|
||||
@Query() filter: FeedFilterDto,
|
||||
) {
|
||||
return this.feedService.getFeed(userId, filter);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user