Fix export route, it should be a child of /api/

This commit is contained in:
Paul Bienkowski 2022-03-03 08:16:59 +01:00
parent 38e14c0084
commit abb935694e

View file

@ -11,7 +11,7 @@ from sqlalchemy import select, func
from sanic.response import raw from sanic.response import raw
from sanic.exceptions import InvalidUsage from sanic.exceptions import InvalidUsage
from obs.api.app import app, json as json_response from obs.api.app import api, json as json_response
class ExportFormat(str, Enum): class ExportFormat(str, Enum):
@ -58,7 +58,7 @@ def shapefile_zip():
zip_file.close() zip_file.close()
@app.get(r"/export/events") @api.get(r"/export/events")
async def export_events(req): async def export_events(req):
bbox = req.ctx.get_single_arg( bbox = req.ctx.get_single_arg(
"bbox", default="-180,-90,180,90", convert=parse_bounding_box "bbox", default="-180,-90,180,90", convert=parse_bounding_box