mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Use Jar naming schema for refresh
This commit is contained in:
parent
1901bdbecb
commit
8c2cfacb4e
@ -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,
|
||||
),
|
||||
(
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user