All files / server/api/users users.me.routes.js

100% Statements 7/7
100% Branches 0/0
100% Functions 0/0
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 171x   1x 1x 1x   1x     1x           1x  
const express = require('express');
 
const auth = require('../utils/auth');
const controller = require('./users.api');
const policy = require('./users.policy');
 
const router = express.Router();
 
// GET /api/me
router.get('/',
  auth.authenticate(),
  controller.fetchMe,
  auth.authorize(policy.canRetrieve, { authenticate: false }),
  controller.retrieve);
 
module.exports = router;