import { Body, Controller, Delete, Param, Post, Put } from '@nestjs/common';
import { BidMetadata } from '../../entities/bid-metadata.entity';
import { BidMetadatasService } from '../../services/bid-metadatas.service';

@Controller('admin/bid-metadatas')
export class AdminBidMetadataController {
  constructor(private readonly bidMetadataService: BidMetadatasService) {}

  @Delete(':id')
  async delete(@Param('id') id: BidMetadata['id']) {
    return await this.bidMetadataService.delete(id);
  }

  @Put(':id')
  async update(
    @Param('id') id: BidMetadata['id'],
    @Body('value') value: string,
  ) {
    return await this.bidMetadataService.update(id, value);
  }
}
