diff options
author | bobzel <zzzman@gmail.com> | 2023-12-04 17:38:36 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-12-04 17:38:36 -0500 |
commit | 2bd239e39264a362d1fbb013ce2613d03247d78e (patch) | |
tree | 6e537dc0c35529c6ee27758a4dec03e23210dbc6 /src/server/authentication | |
parent | cf7a7dc34426dacf018ac98a83a9589106ae7256 (diff) |
trying to do version updates on all npm packages.
Diffstat (limited to 'src/server/authentication')
-rw-r--r-- | src/server/authentication/AuthenticationManager.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/authentication/AuthenticationManager.ts b/src/server/authentication/AuthenticationManager.ts index 52d876e95..74d8d2523 100644 --- a/src/server/authentication/AuthenticationManager.ts +++ b/src/server/authentication/AuthenticationManager.ts @@ -3,10 +3,9 @@ import { Request, Response, NextFunction } from 'express'; import * as passport from 'passport'; import { IVerifyOptions } from 'passport-local'; import './Passport'; -import flash = require('express-flash'); import * as async from 'async'; import * as nodemailer from 'nodemailer'; -import c = require('crypto'); +import * as c from 'crypto'; import { emptyFunction, Utils } from '../../Utils'; import { MailOptions } from 'nodemailer/lib/stream-transport'; @@ -62,7 +61,7 @@ export let postSignup = (req: Request, res: Response, next: NextFunction) => { if (existingUser) { return res.redirect('/login'); } - user.save((err: any) => { + user.save().then(undefined, (err: any) => { if (err) { return next(err); } @@ -187,7 +186,7 @@ export let postForgot = function (req: Request, res: Response, next: NextFunctio } user.passwordResetToken = token; user.passwordResetExpires = new Date(Date.now() + 3600000); // 1 HOUR - user.save(function (err: any) { + user.save().then(undefined, (err: any) => { done(null, token, user); }); }); @@ -259,7 +258,7 @@ export let postReset = function (req: Request, res: Response) { user.passwordResetToken = undefined; user.passwordResetExpires = undefined; - user.save(function (err) { + user.save().then(undefined, (err:any) => { if (err) { res.redirect('/login'); return; |