Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
rename serveAngular as addSpaRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
typerandom committed Dec 28, 2015
1 parent edc47ec commit d5357ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/stormpath.js
Expand Up @@ -113,7 +113,7 @@ module.exports.init = function (app, opts) {
next();
}

function serveAngular(path) {
function addSpaRoute(path) {
router.get(path, function (req, res) {
res.sendFile(web.spaRoot);
});
Expand All @@ -133,7 +133,7 @@ module.exports.init = function (app, opts) {
router.get(web.register.uri, controllers.idSiteRedirect({ path: web.idSite.registerUri }));
} else {
if (web.spaRoot) {
serveAngular(web.register.uri);
addSpaRoute(web.register.uri);
} else {
router.get(web.register.uri, controllers.register);
}
Expand All @@ -147,7 +147,7 @@ module.exports.init = function (app, opts) {
} else {
router.use(web.login.uri, stormpathMiddleware);
if (web.spaRoot) {
serveAngular(web.login.uri);
addSpaRoute(web.login.uri);
} else {
router.get(web.login.uri, controllers.login);
}
Expand Down Expand Up @@ -182,7 +182,7 @@ module.exports.init = function (app, opts) {

if (web.changePassword.enabled) {
if (web.spaRoot) {
serveAngular(web.changePassword.uri);
addSpaRoute(web.changePassword.uri);
} else {
router.get(web.changePassword.uri, controllers.changePassword);
}
Expand Down

0 comments on commit d5357ac

Please sign in to comment.