simplify expiry calculation, timezone unneccessary

pull/307/head
femyeda 2021-06-25 09:23:32 -05:00
parent 6fec24a69d
commit e883ab591a
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
if (maybePreviousRequest && maybePreviousRequest?.length >= 1) {
passwordRequest = maybePreviousRequest[0];
} else {
const expiry = dayjs().tz(maybeUser.timeZone).add(6, "hours").toDate();
const expiry = dayjs().add(6, "hours").toDate();
const createdResetPasswordRequest = await prisma.resetPasswordRequest.create({
data: {
email: rawEmail,