import express from 'express'; import globals from '../globals'; const router = express.Router(); router.get('/', (req, res) => { res.json({status: 'API server up and running!'}); }); router.get('/authorized', (req, res) => { if (!req.auth(res, globals.levels)) return; res.json({status: 'Authorization successful', method: req.authDetails.method}); }); module.exports = router;