import {
    Controller,
    Put,
    Get,
    Body,
    Param,
    HttpStatus,
    NotFoundException,
    Delete,
    BadRequestException,
    Req,
    Post
} from '@nestjs/common'
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'
import { LabelService } from './label.service'
import { LabelDto } from './dto/label.dto'

@ApiTags('label')
@Controller('/label')
@ApiBearerAuth()
export class LabelController {

    constructor(private readonly labelService: LabelService) { }


    @Put()
    public async add(@Body() labelDto: LabelDto) {
        return await this.labelService.add(labelDto)
    }

    @Get('/getRandom/:num')
    public async randomQuery(@Param('num') num: number) {
        return await this.labelService.randomQuery(num)
    }

}
