Name change

This commit is contained in:
pawan-dot 2024-07-09 15:25:42 +05:30
parent f9d81986fa
commit efea635c3f
7 changed files with 55 additions and 55 deletions

View File

@ -18,7 +18,7 @@ export const addImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
bannerImage.tempFilePath,
{
folder: "Ayurpulse/loginImage",
folder: "Cheminova/loginImage",
}
);
@ -84,7 +84,7 @@ export const getImage = async (req, res) => {
// const result = await cloudinary.v2.uploader.upload(
// bannerImag.tempFilePath,
// {
// folder: "Ayurpulse/loginImage",
// folder: "Cheminova/loginImage",
// }
// );
@ -145,7 +145,7 @@ export const updateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
bannerImag.tempFilePath,
{
folder: "Ayurpulse/loginImage",
folder: "Cheminova/loginImage",
}
);
const update = await LoginImageModel.findOneAndUpdate(
@ -223,7 +223,7 @@ export const CreateAndUpdateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
LoginImag.tempFilePath,
{
folder: "Ayurpulse/loginImage",
folder: "Cheminova/loginImage",
}
);
// console.log("result", result);
@ -241,7 +241,7 @@ export const CreateAndUpdateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
LoginImag.tempFilePath,
{
folder: "Ayurpulse/loginImage",
folder: "Cheminova/loginImage",
}
);
if (result) {

View File

@ -384,7 +384,7 @@ export const paymentVerification = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Your Order #${findSameOrder?.orderID} Confirmation`,
html: ` <h1 style="color: #333; text-align: center; font-family: Arial, sans-serif;">Welcome to Tavisa - Let the Shopping Begin!</h1>
html: ` <h1 style="color: #333; text-align: center; font-family: Arial, sans-serif;">Welcome to Cheminova - Let the Shopping Begin!</h1>
<strong style="color: #1b03a3; font-size: 16px"> Hi ${findSameOrder?.shippingInfo?.first_Name
},</strong>
@ -468,7 +468,7 @@ export const paymentVerification = async (req, res) => {
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
// console.log("findSameOrder", findSameOrder);
@ -535,7 +535,7 @@ export const pospaymentVerification = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Your Order #${findSameOrder?.orderID} Confirmation`,
html: ` <h1 style="color: #333; text-align: center; font-family: Arial, sans-serif;">Welcome to Tavisa - Let the Shopping Begin!</h1>
html: ` <h1 style="color: #333; text-align: center; font-family: Arial, sans-serif;">Welcome to Cheminova - Let the Shopping Begin!</h1>
<strong style="color: #1b03a3; font-size: 16px"> Hi ${findSameOrder?.shippingInfo?.first_Name
},</strong>
@ -619,7 +619,7 @@ export const pospaymentVerification = async (req, res) => {
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
// console.log("findSameOrder", findSameOrder);
@ -763,24 +763,24 @@ export const webhook = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Your Order #${findOrder?.orderID} Confirmation`,
html: ` <h1 style="color: #333; text-align: center; font-family: Arial, sans-serif;">Welcome to Tavisa - Let the Shopping Begin!</h1>
html: ` <h1 style="color: #333; text-align: center; font-family: Arial, sans-serif;">Welcome to Cheminova - Let the Shopping Begin!</h1>
<strong style="color: #1b03a3; font-size: 16px"> Hi ${findOrder?.shippingInfo?.first_Name},</strong>
<p style="color: #555; font-size: 15px;">Great news! Your order #${findOrder?.orderID} has been confirmed. Here are the details</p>
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
// Items: [List of Purchased Items]
// Total Amount: [Total Amount]
// Shipping Address: [Shipping Address]
// We'll keep you updated on the shipping progress. Thanks for choosing Tavisa!
// We'll keep you updated on the shipping progress. Thanks for choosing Cheminova!
// Best regards
// Team Tavisa
// Team Cheminova
console.log(
"event.data.object",
event.data.object,

View File

@ -245,7 +245,7 @@ export const updateOrderStatusById = async (req, res) => {
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
return res
.status(200)
@ -327,11 +327,11 @@ export const updateOrderStatusById = async (req, res) => {
</tbody>
</table>
<h5 style="color: #333; font-family: Arial, sans-serif;">We'll send you another email with the tracking details as soon as your order is dispatched. If you have any questions or need assistance, feel free to reply to this email.</h5>
<h5 style="color: #333; font-family: Arial, sans-serif;">Thank you for choosing Tavisa!</h5>
<h5 style="color: #333; font-family: Arial, sans-serif;">Thank you for choosing Cheminova!</h5>
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
return res
.status(200)
@ -441,12 +441,12 @@ export const updateOrderStatusById = async (req, res) => {
<h3 style="color: #333; font-family: Arial, sans-serif;">Order Status : Dispatched</h3>
<h4 style="color: #333; font-family: Arial, sans-serif;">If you have any questions or need assistance, feel free to reply to this email.
</h4>
<h5 style="color: #333; font-family: Arial, sans-serif;">Thanks for choosing Tavisa! We hope you enjoy your purchase.
<h5 style="color: #333; font-family: Arial, sans-serif;">Thanks for choosing Cheminova! We hope you enjoy your purchase.
</h5>
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
return res
.status(200)
@ -529,13 +529,13 @@ export const updateOrderStatusById = async (req, res) => {
</h4>
<h5 style="color: #333; font-family: Arial, sans-serif;">If you have any questions or concerns about your order, feel free to reply to this email.
</h5>
<h5 style="color: #333; font-family: Arial, sans-serif;">Thank you for choosing Tavisa! We hope to serve you again soon.
<h5 style="color: #333; font-family: Arial, sans-serif;">Thank you for choosing Cheminova! We hope to serve you again soon.
</h5>
<br/>
<span style="color: #555; font-size: 13px;">Best regards,</span><br/>
<span style="color: #555; font-size: 13px;">Team Tavisa</span>`,
<span style="color: #555; font-size: 13px;">Team Cheminova</span>`,
});
return res

View File

@ -28,7 +28,7 @@ export const register = async (req, res) => {
patient = new Patient({ name, mobileNumber: fullMobileNumber, otp, otpExpires });
}
await patient.save();
await sendOtp(fullMobileNumber, `Your tavisa verification OTP is: ${otp}`);
await sendOtp(fullMobileNumber, `Your Cheminova verification OTP is: ${otp}`);
@ -376,7 +376,7 @@ export const forgotPassword = async (req, res) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Tavisa Password Recovery`,
subject: `Cheminova Password Recovery`,
html: `your new password is: <br/> <strong> ${passwords}</strong><br/><br/>If you have not requested this email then, please ignore it.`,
});
@ -423,7 +423,7 @@ export const UploadProfileImage = async (req, res) => {
const myCloud = await cloudinary.v2.uploader.upload(patientImage.tempFilePath,
{
folder: "tavisa/patient-image",
folder: "Cheminova/patient-image",
});
@ -477,7 +477,7 @@ export const updateMobileNumber = async (req, res) => {
patient.otpExpires = otpExpires;
await patient.save();
await sendOtp(newFullMobileNumber, `Your tavisa verification OTP is: ${otp}`);
await sendOtp(newFullMobileNumber, `Your Cheminova verification OTP is: ${otp}`);
return res.status(200).json({ message: `OTP sent to your new mobile number ${newFullMobileNumber} successfully` });
} catch (error) {

View File

@ -235,7 +235,7 @@ export const CreateAndUpdateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
RegisterImag.tempFilePath,
{
folder: "Ayurpulse/RegisterImage",
folder: "Cheminova/RegisterImage",
}
);
// console.log("result", result);
@ -253,7 +253,7 @@ export const CreateAndUpdateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
RegisterImag.tempFilePath,
{
folder: "Ayurpulse/RegisterImage",
folder: "Cheminova/RegisterImage",
}
);
if (result) {

View File

@ -233,7 +233,7 @@ export const CreateAndUpdateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
ShopImag.tempFilePath,
{
folder: "Ayurpulse/ShopImage",
folder: "Cheminova/ShopImage",
}
);
// console.log("result", result);
@ -251,7 +251,7 @@ export const CreateAndUpdateImage = async (req, res) => {
const result = await cloudinary.v2.uploader.upload(
ShopImag.tempFilePath,
{
folder: "Ayurpulse/shopImage",
folder: "Cheminova/shopImage",
}
);
if (result) {

View File

@ -26,7 +26,7 @@ export const registerUser = async (req, res) => {
const myCloud = await cloudinary.uploader.upload(
files.tempFilePath,
{
folder: "tavisa/user-image",
folder: "Cheminova/user-image",
},
function (error, result) {
result, error;
@ -52,32 +52,32 @@ export const registerUser = async (req, res) => {
const config = await Config.find();
let appName = config[0]?.appName;
await sendEmail({
to: `${email}`, // Change to your recipient
// await sendEmail({
// to: `${email}`, // Change to your recipient
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
// from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `Welcome to AyurPulse - Let the Shopping Begin!`,
html: ` <h1 style="color: #333; text-align: left; font-family: Arial, sans-serif;">Welcome to ${appName} - Let the Shopping Begin!</h1>
<strong style="color: #1b03a3; font-size: 16px"> Hey ${name},</strong>
<p style="color: #555; font-size: 15px;">
Welcome to AyurPulse - Let the Shopping Begin!
</p>
<br/>
<p style="color: #555; font-size: 15px;">You can login into :${role === "Employee" || role === "admin"
? `https://admin.smellika.com/`
: `https://smellika.com`
} </p>
<br/>
<p style="color: #555; font-size: 15px;">Below are your login credentials:</p>
<p style="color: #555; font-size: 15px;">Email: ${email}</p>
<p style="color: #555; font-size: 15px;">Password: ${password}</p>
<span style="color: #555; font-size: 13px;">Happy shopping,</span><br/>
<span style="color: #555; font-size: 13px;">Team ${appName}</span>`,
});
// subject: `Welcome to Cheminova - Let the Shopping Begin!`,
// html: ` <h1 style="color: #333; text-align: left; font-family: Arial, sans-serif;">Welcome to ${appName} - Let the Shopping Begin!</h1>
// <strong style="color: #1b03a3; font-size: 16px"> Hey ${name},</strong>
// <p style="color: #555; font-size: 15px;">
// Welcome to Cheminova - Let the Shopping Begin!
// </p>
// <br/>
// <p style="color: #555; font-size: 15px;">You can login into :${role === "Employee" || role === "admin"
// ? `https://admin.smellika.com/`
// : `https://smellika.com`
// } </p>
// <br/>
// <p style="color: #555; font-size: 15px;">Below are your login credentials:</p>
// <p style="color: #555; font-size: 15px;">Email: ${email}</p>
// <p style="color: #555; font-size: 15px;">Password: ${password}</p>
// <span style="color: #555; font-size: 13px;">Happy shopping,</span><br/>
// <span style="color: #555; font-size: 13px;">Team ${appName}</span>`,
// });
sendToken(user, 201, res);
} catch (e) {
return res.status(400).json({ success: false, message: e.message });
@ -160,7 +160,7 @@ export const forgotPassword = async (req, res, next) => {
from: `${process.env.SEND_EMAIL_FROM}`, // Change to your verified sender
subject: `AyurPulse Password Recovery`,
subject: `Cheminova Password Recovery`,
html: `your new password is: <br/> <strong> ${passwords}</strong><br/><br/>If you have not requested this email then, please ignore it.`,
});
@ -337,7 +337,7 @@ export const updateProfile = catchAsyncErrors(async (req, res, next) => {
// const myCloud = await cloudinary.v2.uploader.upload(userImage.tempFilePath,
// {
// folder: "tavisa/user-image",
// folder: "Cheminova/user-image",
// });