to do: session verification middleware

This commit is contained in:
Mikayla Dobson
2022-07-17 11:59:32 -05:00
parent af3ea629d6
commit 3d43d95674
4 changed files with 5 additions and 19 deletions

View File

@@ -8,6 +8,7 @@ module.exports = (app, passport) => {
/**
* @function LoginService
* @params email: string, password: string
* @returns: object, with keys:
* session: session object
* userProfile: postgres response from query
@@ -28,17 +29,4 @@ module.exports = (app, passport) => {
}
})
);
// loginRouter.post('/', (req, res) =>
// passport.authenticate('local', { successRedirect: '/', failureRedirect: '/login' })
// (req, res => {
// try {
// const data = LoginService(email, password);
// const { session, userProfile } = data;
// res.status(200).send({ session, userProfile });
// } catch(e) {
// next(e);
// }
// }
// ));
}