source: pages/api/postgre/activate/[id].js@ 22367db

main
Last change on this file since 22367db was e007fcd, checked in by anastasovv <simon@…>, 2 years ago

Now you need to activate your account via email & also added mail sending after server crash

  • Property mode set to 100644
File size: 863 bytes
Line 
1import axios from "axios";
2
3export default function handler(req, res) {
4 /**
5 * GET method
6 */
7 if (req.method === 'GET') {
8 /**
9 * /---------------------- GET ----------------------/
10 * Activate account
11 * @action activate_account
12 * @param id emailActivationId
13 */
14 if (req.query?.action === 'activate_account' && req.query?.id) {
15 const emailActivationId = req.query.id
16
17 axios.get(`${process.env.HOME_URL}/api/postgre/?action=activate_account&emailActivationId=${emailActivationId}`).then(postgreRes => {
18 if (postgreRes.data?.success) {
19 res.json({
20 success: true,
21 })
22 }
23 else {
24 res.end();
25 }
26 });
27 }
28 }
29}
Note: See TracBrowser for help on using the repository browser.