import { Body, Controller, Post, UseGuards } from '@nestjs/common';
import { CrmService } from './crm.service';
import { GetInfoByIdsDto } from './dto/get-info-by-ids.dto';
import { GetPriceDto } from './dto/get-price.dto';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';

@Controller({
  path: 'crm',
  version: '1',
})
export class CrmController {
  constructor(private readonly crmService: CrmService) {}

  // @UseGuards(JwtAuthGuard)
  @Post('getPrice')
  getPrice(@Body() body: GetPriceDto) {
    return this.crmService.getPrice(body);
  }

  @Post('getInfo')
  findAll(@Body() body: GetInfoByIdsDto) {
    return this.crmService.getInfoByIds(body);
  }
}
