import {
    Body,
    Controller,
    Post
} from '@nestjs/common'
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'
import { LikesService } from './likes.service'
import { PageRequest } from 'src/common/dto/page-request'
import { Likes } from './entities/likes.entity'

@ApiTags('likes')
@Controller('/likes')
@ApiBearerAuth()
export class LikesController {

    constructor(private readonly likesService: LikesService) { }

    @Post()
    public async list(@Body() page: PageRequest<Likes>) {
        return await this.likesService.findAll(page)
    }

}