function load (req, res, next, id) {
  User.get(id)
    .then((user) => {
      req.user = user
      return next()
    })
    .catch(e => next(new APIError(e)))
}
/**
 * Load user and append to req.
 */
Load user and append to req.
Load user and append to req .
function load (req, res, next, id) {
  User.get(id)
    .then((user) => {
      req.user = user
      return next()
    })
    .catch(e => next(new APIError(e)))
}
function load ( req , res , next , id ) { User . get ( id ) . then ( ( user ) => { req . user = user return next ( ) } ) . catch ( e => next ( new APIError ( e ) ) ) }
Load user and append to req.
Load user and append to req .