mirror of
https://git.sr.ht/~metalune/simpleweb_peertube
synced 2024-12-22 14:15:21 +01:00
/search supports GET forms, as required by OpenSearch
This commit is contained in:
parent
ee6b30b0c0
commit
0b47bda1aa
5
main.py
5
main.py
@ -131,6 +131,11 @@ async def simpleer_search_redirect():
|
|||||||
query = (await request.form)["query"]
|
query = (await request.form)["query"]
|
||||||
return redirect("/search/" + query)
|
return redirect("/search/" + query)
|
||||||
|
|
||||||
|
@app.route("/search", methods = ["GET"])
|
||||||
|
async def simpleer_search_get_redirect():
|
||||||
|
query = request.args.get("query")
|
||||||
|
return redirect("/search/" + query)
|
||||||
|
|
||||||
@app.route("/search/<string:query>", defaults = {"page": 1})
|
@app.route("/search/<string:query>", defaults = {"page": 1})
|
||||||
@app.route("/search/<string:query>/<int:page>")
|
@app.route("/search/<string:query>/<int:page>")
|
||||||
async def simpleer_search(query, page):
|
async def simpleer_search(query, page):
|
||||||
|
Loading…
Reference in New Issue
Block a user