Skip to content

Commit

Permalink
ext
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Jan 2, 2018
1 parent 8245e79 commit 785d697
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function processQueryRequest(req, resp) {
}

const type = req.params.type;
if (type !== `geojson` && type !== `topojson`) {
if (type !== `geojson.json` && type !== `topojson.json`) {
throw new MyError(400, `bad type parameter`);
}

Expand All @@ -94,11 +94,11 @@ async function processQueryRequest(req, resp) {
let result = PostgresService.toGeoJSON(pres);

switch (type) {
case `geojson`:
case `geojson.json`:
resp.status(200).type(`application/geo+json`).send(result);
break;

case `topojson`:
case `topojson.json`:

result = topojson.topology({data: JSON.parse(result)}, {
// preserve all properties
Expand Down

0 comments on commit 785d697

Please sign in to comment.