Skip to content
Snippets Groups Projects
Verified Commit a373ad6e authored by insert's avatar insert
Browse files

Update verification email, also redirect to /.

parent 6ba53752
No related merge requests found
...@@ -70,13 +70,10 @@ ...@@ -70,13 +70,10 @@
<tr> <tr>
<td valign="top"> <td valign="top">
<h2 class="bodyHeader">Welcome aboard.</h2> <h2 class="bodyHeader">Welcome aboard.</h2>
<p>You'll be notified of any development updates.</p> <p>You'll be notified of any development updates once we verify your email.</p>
<p>We just need to verify your email so that we can send you emails in the future.</p> <p>Thanks for signing up.</p>
<br><br> <br><br>
<center><a class="button" href="https://revolt.chat/api/verify?id={{id}}">Verify email</a></center> <center><a class="button" href="https://revolt.chat/api/verify?id={{id}}">Verify email</a></center>
<br><br>
<p>Want to spread the word?</p>
<p>Your referral link is <a href="https://revolt.chat/?ref={{ref}}">https://revolt.chat/?ref={{ref}}</a></p>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -21,7 +21,7 @@ handler.get(async (req: NextApiRequest, res: NextApiResponse) => { ...@@ -21,7 +21,7 @@ handler.get(async (req: NextApiRequest, res: NextApiResponse) => {
if (result) { if (result) {
if (result.verified) { if (result.verified) {
res.send('Already verified! :)'); res.writeHead(303, { Location: '/' });
return; return;
} }
...@@ -45,7 +45,7 @@ handler.get(async (req: NextApiRequest, res: NextApiResponse) => { ...@@ -45,7 +45,7 @@ handler.get(async (req: NextApiRequest, res: NextApiResponse) => {
] ]
}).then(() => {}).catch((err) => console.warn(err)); }).then(() => {}).catch((err) => console.warn(err));
res.send('Verified your email! Thanks :)'); res.writeHead(303, { Location: '/' });
} else { } else {
res.send('Unknown ID. :('); res.send('Unknown ID. :(');
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment