text: const router = require('express').Router()
  const {User} = require('../db/models')
  module.exports = router
  
  router.get('/', async (req, res, next) => {
    try {
      if (req.user.dataValues.isAdmin) {
        const users = await User.findAll({
        // explicitly select only the id and email fields - even though
        // users' passwords are encrypted, it won't help if we just
        // send everything to anyone who asks!
        attributes: ['id', 'email']
        })
        res.json(users)
      }
      else {
        res.statusMessage = "Access Forbidden";
        res.status(403).end();
      }
    } catch (err) {
      next(err)
    }
  })
  