mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: send reset password email
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import { sendResetPassword } from "@documenso/lib/mail";
|
||||
import { defaultHandler, defaultResponder } from "@documenso/lib/server";
|
||||
import prisma from "@documenso/prisma";
|
||||
import crypto from "crypto";
|
||||
@ -31,9 +32,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
},
|
||||
});
|
||||
|
||||
console.log(passwordResetToken);
|
||||
|
||||
// TODO: Send token to user via email
|
||||
await sendResetPassword(user, passwordResetToken.token);
|
||||
|
||||
res.status(201).end();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user