mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Appease sonar
This commit is contained in:
parent
9d26a8ff8d
commit
fe5e7e8851
@ -387,7 +387,7 @@
|
||||
file = $("#file")[0].files[0]
|
||||
document.getElementById("upload_input").innerHTML = '<div class="progress" style="width: 100%"><div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"> <i class="fa-solid fa-spinner"></i></div></div>';
|
||||
let xmlHttpRequest = new XMLHttpRequest();
|
||||
const token = getCookie("_xsrf")
|
||||
let token = getCookie("_xsrf")
|
||||
let fileName = file.name
|
||||
let target = '/upload'
|
||||
let mimeType = file.type
|
||||
|
@ -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: {
|
||||
|
@ -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
|
||||
|
@ -530,7 +530,7 @@
|
||||
file = $("#file")[0].files[0]
|
||||
document.getElementById("upload_input").innerHTML = '<div class="progress" style="width: 100%;"><div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"> <i class="fa-solid fa-spinner"></i></div></div>'
|
||||
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',
|
||||
|
@ -854,7 +854,7 @@
|
||||
file = $("#file")[0].files[0]
|
||||
document.getElementById("upload_input").innerHTML = '<div class="progress" style="width: 100%;"><div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"> <i class="fa-solid fa-spinner"></i></div></div>'
|
||||
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: {
|
||||
|
Loading…
Reference in New Issue
Block a user