This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
score-tracker/routes/accounts.js

11 lines
253 B
JavaScript

const passport = require('passport');
var router = express.Router();
const app = require('../app');
router.post('/login', passport.authenticate('local'), (req, res, next) => {
const { user } = req;
res.json(user);
});
module.exports = router;