Fix function calls for refresh cache

This commit is contained in:
Andrew 2023-09-08 20:31:13 -04:00
parent f2b906fe5c
commit 7765695943

View File

@ -22,7 +22,7 @@ class ApiCraftyJarCacheIndexHandler(BaseApiHandler):
200,
{
"status": "ok",
"data": self.controller.server_jars.manual_refresh_cache(),
"data": self.controller.server_jars.get_serverjar_data(),
},
)
@ -43,11 +43,11 @@ class ApiCraftySteamCacheIndexHandler(BaseApiHandler):
if not auth_data[4]["superuser"]:
return self.finish_json(400, {"status": "error", "error": "NOT_AUTHORIZED"})
self.controller.server_jars.manual_refresh_cache()
self.controller.server_jars.refresh_cache()
self.finish_json(
200,
{
"status": "ok",
"data": self.controller.steam_apps.refresh_cache(),
"data": self.controller.steam_apps.fetch_cache(),
},
)