mirror of
https://github.com/krateng/maloja.git
synced 2025-04-20 18:47:37 +03:00
Fixed issue with API redirect
This commit is contained in:
parent
52a9faae90
commit
5cf7ca2e9b
@ -5,7 +5,7 @@ author = {
|
||||
"email":"maloja@krateng.dev",
|
||||
"github": "krateng"
|
||||
}
|
||||
version = 2,9,1
|
||||
version = 2,9,2
|
||||
versionstr = ".".join(str(n) for n in version)
|
||||
links = {
|
||||
"pypi":"malojaserver",
|
||||
|
@ -134,7 +134,7 @@ def compose_querystring(*dicts,exclude=[]):
|
||||
values = keys.getall(k)
|
||||
st += "&".join([urllib.parse.urlencode({k:v},safe="/") for v in values])
|
||||
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
|
||||
|
@ -68,7 +68,7 @@ def deprecated_api_s(pth):
|
||||
@webserver.get("/api/<pth:path>")
|
||||
@webserver.post("/api/<pth:path>")
|
||||
def deprecated_api(pth):
|
||||
redirect("/apis/mlj_1/" + pth + "?" + compose_querystring(request.query))
|
||||
redirect("/apis/mlj_1/" + pth + "?" + request.query_string)
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user