-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tem1 #55
base: master
Are you sure you want to change the base?
tem1 #55
Conversation
|
||
return sendVerificationMail(req.body.email, verificationID); | ||
}) | ||
.then(results => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
@@ -256,12 +260,13 @@ router.post('/register', | |||
errors: results.array() | |||
}); | |||
} else { | |||
const verificationID = nanoid(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
routes/index.js
Outdated
@@ -1,5 +1,9 @@ | |||
const express = require('express'); | |||
const path = require('path'); | |||
const { nanoid } = require('nanoid'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
.catch((err) => { | ||
console.log(err); | ||
}); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
res.send("<h1>INVALID Verification</h1>"); | ||
} | ||
}) | ||
.catch((err) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
@@ -16,6 +17,21 @@ router.all('/test', function (_req, res) { | |||
debug("into /test"); | |||
res.send("TEST SUCCESS"); | |||
}); | |||
router.get('/verify', (req, res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
@@ -1,6 +1,7 @@ | |||
const express = require('express'); | |||
const path = require('path'); | |||
const mysql = require('mysql2'); | |||
const bcrypt = require('bcrypt'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
// console.log(reason); | ||
// }); | ||
const sendVerificationEmail = (email, verificationCode) => { | ||
const emailHTML = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'template literal syntax' is only available in ES6 (use 'esversion: 6').
// console.log("ERROR"); | ||
// console.log(reason); | ||
// }); | ||
const sendVerificationEmail = (email, verificationCode) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,647 @@ | |||
const mail = require("@sendgrid/mail"); | |||
if(! process.env.NODE_ENV || process.env.NODE_ENV !== "production") { | |||
const dotenv = require("dotenv").config({path: "../.env"}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
nanoid | ||
} = require('nanoid'); | ||
// const bcrypt = require('bcrypt'); | ||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,647 @@ | |||
const mail = require("@sendgrid/mail"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -2,7 +2,7 @@ var fs = require('fs'); | |||
var mysql = require('mysql2'); | |||
// // var myconfig = require('./myconfig.json'); | |||
if (!process.env.NODE_ENV || process.env.NODE_ENV !== "production") { | |||
const dotenv = require("dotenv").config() | |||
const dotenv = require("dotenv").config({path: '../.env'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -22,7 +22,7 @@ pool = pool.promise(); | |||
(async () => { | |||
try { | |||
// let id, email, temp, isVerified; | |||
let reply = await pool.query("CALL Reg(?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", ["[email protected]", "sjfbsdhfbsudhfbuhsdb", "omkaragrawal", 1234567890, "sfsdv", "Mumbai", "India", 401107, "sgdvsg", "hsdvghs"]); | |||
let reply = await pool.query("CALL Reg(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", ["[email protected]", "sjfbsdhfbsudhfbuhsdb", "omkaragrawal", 1234567890, "sfsdv", "Mumbai", "India", 401107, "sgdvsg", "hsdvghs", "123456789012345678901"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad assignment.
Expected ')' to match '(' from line 22 and instead saw 'reply'.
Expected an identifier and instead saw 'let'.
Missing semicolon.
No description provided.