mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
bdd: move output format computation into response
This commit is contained in:
@@ -40,6 +40,10 @@ class GenericResponse:
|
||||
""" Common base class for all API responses.
|
||||
"""
|
||||
def __init__(self, page, fmt, errorcode=200):
|
||||
fmt = fmt.strip()
|
||||
if fmt == 'jsonv2':
|
||||
fmt = 'json'
|
||||
|
||||
self.page = page
|
||||
self.format = fmt
|
||||
self.errorcode = errorcode
|
||||
|
||||
Reference in New Issue
Block a user