lib/services/attachRoutes.js
function attachRedirect(router, { path, redirect }, site) {
  redirect = normalizeRedirectPath(redirect, site);

  return router.get(path, (req, res) => {
    res.redirect(301, redirect);
  });
}
function attachRedirect(router, { path, redirect }, site) {
  redirect = normalizeRedirectPath(redirect, site);

  return router.get(path, (req, res) => {
    res.redirect(301, redirect);
  });
}
function attachRedirect ( router , { path , redirect } , site ) { redirect = normalizeRedirectPath ( redirect , site ) ; return router . get ( path , ( req , res ) => { res . redirect ( 301 , redirect ) ; } ) ; }
Attaches a route with redirect to the router.
@param {Router} router
@param {Object} route
@param {String} route.path
@param {String} route.redirect
@param {Object} site
@return {Router}
Attaches a route with redirect to the router .