Change passport require
parent
a6fe6d6c72
commit
8e8f0e3e7c
|
@ -1,5 +1,6 @@
|
|||
var express = require('express');
|
||||
var router = express.Router();
|
||||
const passport = require('passport');
|
||||
const accounts = require('./../database/accounts/accounts');
|
||||
const app = require('../app');
|
||||
|
||||
|
@ -8,7 +9,7 @@ router.get('/login', (req, res, next) => {
|
|||
});
|
||||
|
||||
router.post('/login',
|
||||
accounts.passport.authenticate('local', {
|
||||
passport.authenticate('local', {
|
||||
failureRedirect: '/fail',
|
||||
successRedirect: '/success',
|
||||
}),
|
||||
|
|
Reference in New Issue