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:
parent
52a9faae90
commit
5cf7ca2e9b
@ -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",
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user