/*
2.7.3 - Метод согласования Предложений Клиентом по Лизинговой сделке в CRM
POST /lk/ConsiderationOpportunity/quote
*/

import CRMRequestPost from '../../../lib/CRMRequestPost';

export default async function handler(req, res) 
{
	console.log("\n\n", "API", "DEALS", "quote");
	console.log(req.body);
	console.log("-".repeat(50));

	const { deal_id, offers } = req.body;

	console.log("/accept");
	console.log({ offers });

	await CRMRequestPost({ 
		req, res, 
		path: `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity/quote?opp_number=${ deal_id }`, 
		params: offers, 
		array: true, 
		log: true, 
	});
}