1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed issue with API redirect

This commit is contained in:
Krateng 2020-09-04 15:23:08 +02:00
parent 52a9faae90
commit 5cf7ca2e9b
No known key found for this signature in database
GPG Key ID: 46735607861C6FCE
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev", "email":"maloja@krateng.dev",
"github": "krateng" "github": "krateng"
} }
version = 2,9,1 version = 2,9,2
versionstr = ".".join(str(n) for n in version) versionstr = ".".join(str(n) for n in version)
links = { links = {
"pypi":"malojaserver", "pypi":"malojaserver",

View File

@ -134,7 +134,7 @@ def compose_querystring(*dicts,exclude=[]):
values = keys.getall(k) values = keys.getall(k)
st += "&".join([urllib.parse.urlencode({k:v},safe="/") for v in values]) st += "&".join([urllib.parse.urlencode({k:v},safe="/") for v in values])
st += "&" st += "&"
return st return st[:-1] if st.endswith("&") else st # remove last ampersand
# takes any number of multidicts and normal dicts and creates a formsdict with duplicate values removed # takes any number of multidicts and normal dicts and creates a formsdict with duplicate values removed

View File

@ -68,7 +68,7 @@ def deprecated_api_s(pth):
@webserver.get("/api/<pth:path>") @webserver.get("/api/<pth:path>")
@webserver.post("/api/<pth:path>") @webserver.post("/api/<pth:path>")
def deprecated_api(pth): def deprecated_api(pth):
redirect("/apis/mlj_1/" + pth + "?" + compose_querystring(request.query)) redirect("/apis/mlj_1/" + pth + "?" + request.query_string)