Add the ability to click on the verification link and verify your email
[ndcode_site.git] / api / sign_up / send_verification_email.json.jst
index 47da582..7ef9d16 100644 (file)
@@ -44,12 +44,12 @@ return async env => {
             421
           )
 
-        let key = crypto.randomBytes(16).toString('hex')
+        let link_code = crypto.randomBytes(16).toString('hex')
         let expires = new XDate()
         expires.addDays(1)
         account.set(
           'verify_email',
-          transaction.json_to_logjson({key, expires: expires.getTime()})
+          transaction.json_to_logjson({link_code, expires: expires.getTime()})
         )
 
         let given_names = await logjson.logjson_to_json(
@@ -71,7 +71,7 @@ return async env => {
 We have received a request to sign up using your email address.
 
 If this request is valid, please verify your email address by visiting the below link:
-${globals.site_url}/my_account/verify_email/index.html?email=${encodeURIComponent(email)}&key=${key}
+${globals.site_url}/my_account/verify_email/index.html?email=${encodeURIComponent(email)}&link_code=${encodeURIComponent(link_code)}
 
 The link is valid for 24 hours.