mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Preserve .json through redirects
This commit is contained in:
parent
d94d4465d7
commit
f1b0521810
1 changed files with 2 additions and 0 deletions
2
app.py
2
app.py
|
|
@ -280,6 +280,8 @@ def resolve_db_name(db_name, **kwargs):
|
||||||
)
|
)
|
||||||
if 'table' in kwargs:
|
if 'table' in kwargs:
|
||||||
should_redirect += '/' + kwargs['table']
|
should_redirect += '/' + kwargs['table']
|
||||||
|
if 'as_json' in kwargs:
|
||||||
|
should_redirect += kwargs['as_json']
|
||||||
return name, expected, should_redirect
|
return name, expected, should_redirect
|
||||||
return name, expected, None
|
return name, expected, None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue