Fix things

This commit is contained in:
Galax028 2021-08-03 11:05:57 +07:00
parent dd1fe07e53
commit f1f345b5da
2 changed files with 5 additions and 4 deletions

View File

@ -4,12 +4,13 @@ from flask import Flask, send_from_directory
server = Flask(__name__) server = Flask(__name__)
@server.get("/")
@server.get("/<string:file>") @server.get("/<string:file>")
def startpage(file = None): def startpage(file = None):
if not file: if not file:
return send_from_directory("/", "startpage.html") return send_from_directory("./", "startpage.html")
else: else:
return send_from_directory("/", file) return send_from_directory("./", file)
@server.get("/ac/<string:query>") @server.get("/ac/<string:query>")

View File

@ -8,8 +8,8 @@
], ],
"routes": [ "routes": [
{ {
"src": "./(.*)", "src": "/(.*)",
"dest": "./" "dest": "/"
} }
] ]
} }