mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-14 02:16:19 +01:00
recover
This commit is contained in:
parent
5a5af35968
commit
5d6ee6f907
1 changed files with 2 additions and 2 deletions
|
@ -244,7 +244,7 @@ router.post("/login", async (req, res) => {
|
||||||
router.post("/verify-mail", async (req, res) => {
|
router.post("/verify-mail", async (req, res) => {
|
||||||
const conn = db.connect();
|
const conn = db.connect();
|
||||||
conn.query(
|
conn.query(
|
||||||
'SELECT * FROM users WHERE token ="' + req.query.token + '"',
|
'SELECT * FROM users WHERE token ="' + req.body.token + '"',
|
||||||
function (err, result) {
|
function (err, result) {
|
||||||
if (err) {
|
if (err) {
|
||||||
res.status(400);
|
res.status(400);
|
||||||
|
@ -258,7 +258,7 @@ router.post("/verify-mail", async (req, res) => {
|
||||||
verify: 1,
|
verify: 1,
|
||||||
token: randtoken.generate(64),
|
token: randtoken.generate(64),
|
||||||
};
|
};
|
||||||
db_connect.query(
|
conn.query(
|
||||||
'UPDATE users SET ? WHERE email ="' + result[0].email + '"',
|
'UPDATE users SET ? WHERE email ="' + result[0].email + '"',
|
||||||
data,
|
data,
|
||||||
function (err, result) {
|
function (err, result) {
|
||||||
|
|
Loading…
Reference in a new issue