Merge branch 'tweak/refresh-handler' into 'dev'

Use Jar naming schema for refresh

See merge request crafty-controller/crafty-4!630
This commit is contained in:
Iain Powrie 2023-09-19 18:34:34 +00:00
commit 5615cc7938
4 changed files with 6 additions and 5 deletions

View File

@ -16,6 +16,7 @@
- Polish/Enhance display for InApp Documentation ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/613))
- Add get_users command to Crafty's console ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/620))
- Make files hover cursor pointer ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/627))
- Use `Jar` class naming for jar refresh to make room for steamCMD naming in the future ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/630))
### Lang
TBD
<br><br>

View File

@ -64,7 +64,7 @@ from app.classes.web.routes.api.crafty.config.server_dir import (
)
from app.classes.web.routes.api.crafty.clogs.index import ApiCraftyLogIndexHandler
from app.classes.web.routes.api.crafty.imports.index import ApiImportFilesIndexHandler
from app.classes.web.routes.api.crafty.exe_cache import ApiCraftyExeCacheIndexHandler
from app.classes.web.routes.api.crafty.exe_cache import ApiCraftyJarCacheIndexHandler
def api_handlers(handler_args):
@ -173,8 +173,8 @@ def api_handlers(handler_args):
handler_args,
),
(
r"/api/v2/crafty/exeCache/?",
ApiCraftyExeCacheIndexHandler,
r"/api/v2/crafty/JarCache/?",
ApiCraftyJarCacheIndexHandler,
handler_args,
),
(

View File

@ -1,7 +1,7 @@
from app.classes.web.base_api_handler import BaseApiHandler
class ApiCraftyExeCacheIndexHandler(BaseApiHandler):
class ApiCraftyJarCacheIndexHandler(BaseApiHandler):
def get(self):
auth_data = self.authenticate_user()
if not auth_data:

View File

@ -1153,7 +1153,7 @@
async function refreshCache() {
document.getElementById("refresh-cache").classList.add("fa-spin")
let token = getCookie("_xsrf")
let res = await fetch(`/api/v2/crafty/exeCache`, {
let res = await fetch(`/api/v2/crafty/JarCache`, {
method: 'GET',
headers: {
'X-XSRFToken': token