src/handlers.js
function setView({ action, config, route, routes, method }) {
  const ws = route.ws;
  return exports.getView(action, config).then(view => {
    routes[ws ? 'ws' : route.type].push({
      action,
      method,
      view,
      match: new Route(route.url),
    });
  });
}
function setView({ action, config, route, routes, method }) {
  const ws = route.ws;
  return exports.getView(action, config).then(view => {
    routes[ws ? 'ws' : route.type].push({
      action,
      method,
      view,
      match: new Route(route.url),
    });
  });
}
function setView ( { action , config , route , routes , method } ) { const ws = route . ws ; return exports . getView ( action , config ) . then ( view => { routes [ ws ? 'ws' : route . type ] . push ( { action , method , view , match : new Route ( route . url ) , } ) ; } ) ; }
Set the view for a specific route
@private
@returns {Promise} Could the view be loaded?
Set the view for a specific route