diff --git a/app/frontend/templates/panel/custom_login.html b/app/frontend/templates/panel/custom_login.html index 0f2f6c10..4eb22ca8 100644 --- a/app/frontend/templates/panel/custom_login.html +++ b/app/frontend/templates/panel/custom_login.html @@ -387,7 +387,7 @@ file = $("#file")[0].files[0] document.getElementById("upload_input").innerHTML = '
 
'; let xmlHttpRequest = new XMLHttpRequest(); - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") let fileName = file.name let target = '/upload' let mimeType = file.type diff --git a/app/frontend/templates/panel/panel_edit_user_apikeys.html b/app/frontend/templates/panel/panel_edit_user_apikeys.html index c08b5518..8aa63ea0 100644 --- a/app/frontend/templates/panel/panel_edit_user_apikeys.html +++ b/app/frontend/templates/panel/panel_edit_user_apikeys.html @@ -269,7 +269,7 @@ $('.delete-api-key').click(async function () { let keyId = $(this).data("key-id"); let keyName = $(this).data("key-name"); - const token = getCookie("_xsrf"); + let token = getCookie("_xsrf"); let res = await fetch(`/api/v2/users/${userId}/key/${keyId}`, { method: 'DELETE', headers: { @@ -290,7 +290,7 @@ $('.get-a-token').click(async function () { let keyId = $(this).data("key-id"); let keyName = $(this).data("key-name"); - const token = getCookie("_xsrf"); + let token = getCookie("_xsrf"); let res = await fetch(`/api/v2/users/${userId}/key/${keyId}`, { method: 'GET', headers: { diff --git a/app/frontend/templates/panel/server_files.html b/app/frontend/templates/panel/server_files.html index 77cc2353..a45a345b 100644 --- a/app/frontend/templates/panel/server_files.html +++ b/app/frontend/templates/panel/server_files.html @@ -720,7 +720,7 @@ async function sendFile(file, path, serverId, left, i, onProgress) { let xmlHttpRequest = new XMLHttpRequest(); - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") let fileName = file.name let target = '/upload?server_id=' + serverId let mimeType = file.type diff --git a/app/frontend/templates/server/bedrock_wizard.html b/app/frontend/templates/server/bedrock_wizard.html index 8eefcf68..e1ae727f 100644 --- a/app/frontend/templates/server/bedrock_wizard.html +++ b/app/frontend/templates/server/bedrock_wizard.html @@ -530,7 +530,7 @@ file = $("#file")[0].files[0] document.getElementById("upload_input").innerHTML = '
 
' let xmlHttpRequest = new XMLHttpRequest(); - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") let fileName = encodeURIComponent(file.name) let target = '/upload' let mimeType = file.type @@ -697,7 +697,7 @@ return role_ids } async function send_server(data) { - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") console.log(token) let res = await fetch(`/api/v2/servers/`, { method: 'POST', diff --git a/app/frontend/templates/server/wizard.html b/app/frontend/templates/server/wizard.html index 080fcb49..879953c7 100644 --- a/app/frontend/templates/server/wizard.html +++ b/app/frontend/templates/server/wizard.html @@ -854,7 +854,7 @@ file = $("#file")[0].files[0] document.getElementById("upload_input").innerHTML = '
 
' let xmlHttpRequest = new XMLHttpRequest(); - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") let fileName = file.name let target = '/upload' let mimeType = file.type @@ -930,7 +930,7 @@ return role_ids } async function send_server(data) { - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") let res = await fetch(`/api/v2/servers/`, { method: 'POST', headers: { @@ -1157,7 +1157,7 @@ async function refreshCache() { document.getElementById("refresh-cache").classList.add("fa-spin") - const token = getCookie("_xsrf") + let token = getCookie("_xsrf") let res = await fetch(`/api/v2/crafty/exeCache`, { method: 'GET', headers: {