Commit 7c8505a2 by Harish Patel

Changes

1 parent ad149cbc
......@@ -8,7 +8,7 @@
"description": ""
},
"options": {
"draftAndPublish": false
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
......
......@@ -42,7 +42,11 @@ const userPermissionExtension = (plugin) => {
.findOne({
populate: ["user"],
where: {
$and: [{ reraNumber: mahareraNumber }, { mobileNo: mobileNumber }],
$and: [
{ publishedAt: { $notNull: true } },
{ reraNumber: mahareraNumber },
{ mobileNo: mobileNumber },
],
},
});
......@@ -89,6 +93,8 @@ const userPermissionExtension = (plugin) => {
// Send an email to the user.
await strapi.plugin("email").service("email").send(emailToSend);
// TODO: Send SMS.
ctx.send({ ok: true, message: "otp sent" });
};
......@@ -106,7 +112,11 @@ const userPermissionExtension = (plugin) => {
.findOne({
populate: ["user"],
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!