   else
     next()
 
+router.get '/getUsers', (req, res) ->
+  res.respond users.getUsers()
+
 module.exports = router
router = express.Router()
passport = require 'passport'
_ = require 'lodash'

router.use (req, res, next) ->
  if !req.user

    res.redirect "/"
  else
    next()
router.use (req, res, next) ->
  res.respond = (data) ->
    res.json data: data
  next()

router.get "/getUser", (req, res) ->
  res.respond _.omit req.user, 'password'

router.get '/getName', (req, res) ->
  res.respond req.user.username

router.get '/getSlides', (req, res) ->
  res.respond req.user.slides

router.post '/setSlides', (req, res) ->
  req.user.slides = req.body.slides
  res.respond req.user.slides

router.use (req, res, next) ->
  if !req.user.admin
