Fix verification emails

This commit is contained in:
Luke Vella 2022-04-12 09:38:28 +01:00
parent 8b10daf2da
commit e9ac2a8e71
2 changed files with 5 additions and 1 deletions

View file

@ -44,6 +44,10 @@ const moduleExports = {
source: "/admin/:urlId", source: "/admin/:urlId",
destination: "/poll?urlId=:urlId", destination: "/poll?urlId=:urlId",
}, },
{
source: "/verify/:urlId/code/:code",
destination: "/poll?urlId=:urlId&code=:code",
},
]; ];
}, },
}; };

View file

@ -131,7 +131,7 @@ export default async function handler(
}, },
}, },
notifications: legacyPoll.creator.allowNotifications, notifications: legacyPoll.creator.allowNotifications,
verificationCode: await nanoid(), // can't get it from api verificationCode: legacyPoll.__private.verificationCode,
options: { options: {
createMany: { createMany: {
data: newOptions, data: newOptions,