Skip to content

Commit

Permalink
Merge pull request #51 from OpendataCH/bug/50
Browse files Browse the repository at this point in the history
Closes #50, making sure /br and /BR both work
  • Loading branch information
rufuspollock committed Oct 9, 2013
2 parents 7cb1600 + de72ab4 commit f3a55c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function processFile(file, callback) {
// console.log(file, idx, key);
return;
}
record.jurisdiction = jurisdictions[record.jurisdiction_code.toUpperCase()];
record.jurisdiction_code = record.jurisdiction_code.toUpperCase();
record.jurisdiction = jurisdictions[record.jurisdiction_code];
record.slug = tokens[1];
record.type = 'body';
db.set(key, record);
Expand Down
4 changes: 2 additions & 2 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exports.index = function(req, res) {
exports.jurisdiction = function(req, res) {
var bodies = [],
name,
jurisdiction = req.params.jurisdiction;
jurisdiction = req.params.jurisdiction.toUpperCase();

db.forEach(function(key, record) {
if (record.jurisdiction_code === jurisdiction) {
Expand All @@ -58,7 +58,7 @@ exports.jurisdiction = function(req, res) {
}
});
res.render('jurisdiction', {
code: jurisdiction.toUpperCase(),
code: jurisdiction,
name: name,
pageTitle: name,
bodies: bodies
Expand Down

0 comments on commit f3a55c8

Please sign in to comment.