Browse Source

🔨 Change arrow func and val

main
Haris Razis 4 years ago
parent
commit
64665a3d0b
No known key found for this signature in database GPG Key ID: 86A4D290ED03FAB4
  1. 13
      server/routes/auth.js
  2. 1
      server/services/socket.js

13
server/routes/auth.js

@ -1,17 +1,20 @@
const express = require('express');
const router = express.Router();
const passport = require('passport')
const router = express.Router();
router.get('/auth/login', passport.authenticate('local', {failureRedirect: '/login'},
router.get('/auth/login', passport.authenticate('local'),
(req, res) => {
res.redirect('/');
})
res.redirect('/dashboard');
}
);
router.get('/auth/logout', (req, res) => {
req.logout();
res.redirect('/login');
res.redirect('/');
});
router.get('/auth/current_user', (req, res) => {
res.send(req.user);
});
module.exports = router;

1
server/services/socket.js

@ -5,7 +5,6 @@ const {pub, sub} = require('../connections/redis_conn')
const {iWrite, closeWrite, iQuery} = require('../actions/influx_actions')
module.exports = (server) => {
// noinspection JSValidateTypes
const io = socket(server)
io.on('connection', socket => {

Loading…
Cancel
Save