fix paths

This commit is contained in:
AAGaming
2023-09-30 13:15:35 -04:00
committed by marios8543
parent b7d4d57bc2
commit 949244e8e6
6 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -107,13 +107,13 @@ class Loader:
self.watcher.disabled = False
async def handle_frontend_assets(self, request: web.Request):
file = path.join(path.dirname(__file__), "static", request.match_info["path"])
file = path.join(path.dirname(__file__), "..", "static", request.match_info["path"])
return web.FileResponse(file, headers={"Cache-Control": "no-cache"})
async def handle_frontend_locales(self, request: web.Request):
req_lang = request.match_info["path"]
file = path.join(path.dirname(__file__), "locales", req_lang)
file = path.join(path.dirname(__file__), "..", "locales", req_lang)
if exists(file):
return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"})
else: