Skip to content
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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

tem1 #55

wants to merge 2 commits into from

Conversation

Omkaragrawal
Copy link
Collaborator

No description provided.


return sendVerificationMail(req.body.email, verificationID);
})
.then(results => {
Copy link

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();
Copy link

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');
Copy link

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);
});
})
Copy link

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) => {
Copy link

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) => {
Copy link

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');
Copy link

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 = `
Copy link

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) => {
Copy link

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"});
Copy link

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 {
Copy link

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");
Copy link

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'});
Copy link

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"]);
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant