error messages
This commit is contained in:
parent
9edaf36aac
commit
15f38b3f66
@ -43,7 +43,12 @@ emailRouter.post('/', zValidator('json', sendEmailSchema), async (c) => {
|
||||
data.barcode_url = dataURL;
|
||||
}
|
||||
if (templateName === "password-reset") {
|
||||
if (data.token) {
|
||||
console.log(data);
|
||||
data.reset_link = `${process.env.FRONTEND_URL}/reset/${(Buffer.from(data.token)).toString("base64")}`
|
||||
} else {
|
||||
return c.json({ success: false, error: "'data.token' not provided" }, 406)
|
||||
}
|
||||
}
|
||||
await emailService.sendEmail({
|
||||
to,
|
||||
|
Loading…
x
Reference in New Issue
Block a user