Commit 7c8505a2 by Harish Patel

Changes

1 parent ad149cbc
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"description": "" "description": ""
}, },
"options": { "options": {
"draftAndPublish": false "draftAndPublish": true
}, },
"pluginOptions": {}, "pluginOptions": {},
"attributes": { "attributes": {
......
...@@ -42,7 +42,11 @@ const userPermissionExtension = (plugin) => { ...@@ -42,7 +42,11 @@ const userPermissionExtension = (plugin) => {
.findOne({ .findOne({
populate: ["user"], populate: ["user"],
where: { where: {
$and: [{ reraNumber: mahareraNumber }, { mobileNo: mobileNumber }], $and: [
{ publishedAt: { $notNull: true } },
{ reraNumber: mahareraNumber },
{ mobileNo: mobileNumber },
],
}, },
}); });
...@@ -89,6 +93,8 @@ const userPermissionExtension = (plugin) => { ...@@ -89,6 +93,8 @@ const userPermissionExtension = (plugin) => {
// Send an email to the user. // Send an email to the user.
await strapi.plugin("email").service("email").send(emailToSend); await strapi.plugin("email").service("email").send(emailToSend);
// TODO: Send SMS.
ctx.send({ ok: true, message: "otp sent" }); ctx.send({ ok: true, message: "otp sent" });
}; };
...@@ -106,7 +112,11 @@ const userPermissionExtension = (plugin) => { ...@@ -106,7 +112,11 @@ const userPermissionExtension = (plugin) => {
.findOne({ .findOne({
populate: ["user"], populate: ["user"],
where: { where: {
$and: [{ reraNumber: mahareraNumber }, { mobileNo: mobileNumber }], $and: [
{ publishedAt: { $notNull: true } },
{ reraNumber: mahareraNumber },
{ mobileNo: mobileNumber },
],
}, },
}); });
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!