Commit 2cf9b731 by jay

.

1 parent 5a81b9d5
...@@ -31,10 +31,11 @@ module.exports = createCoreController( ...@@ -31,10 +31,11 @@ module.exports = createCoreController(
); );
} }
try { try {
console.log("Helllo >>>>>>>>", ctx.request.body.data);
const spertoRegisterCP = await strapi const spertoRegisterCP = await strapi
.service("api::channel-partner.channel-partner") .service("api::channel-partner.channel-partner")
.sendCPToSperto(ctx.request.body.data); .sendCPToSperto(ctx.request.body.data);
console.log("Helllo >>>>>>>>", spertoRegisterCP);
ctx.request.body.data.httpRegisterCPRequestHeaders = JSON.stringify( ctx.request.body.data.httpRegisterCPRequestHeaders = JSON.stringify(
spertoRegisterCP.headers spertoRegisterCP.headers
); );
......
...@@ -18,7 +18,7 @@ module.exports = createCoreService( ...@@ -18,7 +18,7 @@ module.exports = createCoreService(
const cpData = { const cpData = {
api_key: process.env.SPERTO_API_KEY, api_key: process.env.SPERTO_API_KEY,
name: data.contactPersonName, name: data.contactPersonName,
firm_type: data.firm_type, // -- firm_type: data.companyType, // --
address: data.communicationAddress, address: data.communicationAddress,
mobile_number: data.mobileNo, mobile_number: data.mobileNo,
email: data.email, email: data.email,
...@@ -29,7 +29,7 @@ module.exports = createCoreService( ...@@ -29,7 +29,7 @@ module.exports = createCoreService(
pancard: data.pan, pancard: data.pan,
member_of: data.memberOf, member_of: data.memberOf,
// scanned_cancelled_cheque_url: data. // scanned_cancelled_cheque_url: data.
// scanned_pan_url: data.panFile, scanned_pan_url: data.panFile,
// rera_certificate_url: // rera_certificate_url:
firm_name: data.companyName, firm_name: data.companyName,
sourcing_manager_id: Number(data.sourcingManager), sourcing_manager_id: Number(data.sourcingManager),
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}, },
"confirmed": { "confirmed": {
"type": "boolean", "type": "boolean",
"default": false, "default": true,
"configurable": false "configurable": false
}, },
"blocked": { "blocked": {
......
...@@ -573,9 +573,9 @@ const userPermissionExtension = (plugin) => { ...@@ -573,9 +573,9 @@ const userPermissionExtension = (plugin) => {
where: { ...identifierFilter, provider }, where: { ...identifierFilter, provider },
}); });
if (conflictingUserCount > 0) { // if (conflictingUserCount > 0) {
throw new ApplicationError("Email or Username are already taken"); // throw new ApplicationError("Email or Username are already taken");
} // }
if (settings.unique_email) { if (settings.unique_email) {
const conflictingUserCount = await strapi const conflictingUserCount = await strapi
...@@ -584,9 +584,9 @@ const userPermissionExtension = (plugin) => { ...@@ -584,9 +584,9 @@ const userPermissionExtension = (plugin) => {
where: { ...identifierFilter }, where: { ...identifierFilter },
}); });
if (conflictingUserCount > 0) { // if (conflictingUserCount > 0) {
throw new ApplicationError("Email or Username are already taken"); // throw new ApplicationError("Email or Username are already taken");
} // }
} }
let newUser = { let newUser = {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!