Skip to content

Commit

Permalink
removed hardcode of hackdash.org on instance list for landing
Browse files Browse the repository at this point in the history
  • Loading branch information
pjnovas committed Feb 10, 2014
1 parent 1be80e9 commit 179de28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions keys.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,5 @@
, "clientSecret": ""
, "callbackURL": "http://local.host:3000/auth/github/callback"
}
, "persona": {
"audience": "http://local.host:3000"
}

}
4 changes: 3 additions & 1 deletion routes/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ var logout = function(req, res, next) {
};

var isHomepage = function(req, res, next) {
var url = config.host + (config.port === 80 ? "" : ":" + config.port);

if(!req.subdomains.length) {
Dashboard.find({}).sort('domain').exec(function(err, dashboards){
res.render('homepage', {dashboards: dashboards});
res.render('homepage', {dashboards: dashboards, baseHost: url });
});
} else {
next();
Expand Down
2 changes: 1 addition & 1 deletion views/homepage.jade
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ html
for dash in dashboards
if dash.domain && dash.domain.length
li
a(href= "http://" +dash.domain + ".hackdash.org") #{dash.domain}
a(href= "http://" +dash.domain + "." + baseHost) #{dash.domain}

.span8
section.block
Expand Down

0 comments on commit 179de28

Please sign in to comment.