Commit c04799e1 by jay

.

1 parent 1a8a62c1
......@@ -10,13 +10,13 @@ module.exports = createCoreController("api::lead.lead", () => ({
async sendLeads(ctx) {},
async create(ctx) {
console.log(">>>>", ctx);
// console.log(">>>>", ctx);
try {
const spretoLeadData = await strapi
.service("api::lead.lead")
.sendLeadToSperto(ctx.request.body.data);
console.log("spretoLeadData", spretoLeadData);
// console.log("spretoLeadData", spretoLeadData);
ctx.request.body.data.httpRequestHeaders = JSON.stringify(
spretoLeadData.headers
);
......
......@@ -23,7 +23,8 @@ module.exports = createCoreService("api::lead.lead", ({ strapi: Strapi }) => ({
otp_verified_yn: "N",
page_url: data.UTMLink ? data.UTMLink : "",
utm_medium: data.utm_medium ? data.utm_medium : "",
utm_source: data.utm_source ? data.utm_source : ""
utm_source: data.utm_source ? data.utm_source : "",
utm_campaign: data.utm_campaign ? data.utm_campaign : ""
};
if (data.comments) {
leadData.comments = data.comments;
......@@ -52,7 +53,7 @@ module.exports = createCoreService("api::lead.lead", ({ strapi: Strapi }) => ({
leadData,
{ headers: headers }
);
console.log("spertoResponse",spertoResponse);
// console.log("spertoResponse",spertoResponse);
return spertoResponse;
},
}));
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!