static fetchById(req, res, next) {
    userService
      .getUser(req.params.id)
      .then(data => res.json({ data }))
      .catch(err => next(err));
  }
/**
   * Get a user by its id.
   *
   * @param {Object} req
   * @param {Object} res
   * @param {Function} next
   */
Get a user by its id.
Get a user by its id .
static fetchById(req, res, next) {
    userService
      .getUser(req.params.id)
      .then(data => res.json({ data }))
      .catch(err => next(err));
  }
static fetchById ( req , res , next ) { userService . getUser ( req . params . id ) . then ( data => res . json ( { data } ) ) . catch ( err => next ( err ) ) ; }
Get a user by its id.
Get a user by its id .