Appease sonar

This commit is contained in:
amcmanu3 2023-09-04 19:22:32 -04:00
parent 9d26a8ff8d
commit fe5e7e8851
5 changed files with 9 additions and 9 deletions

View File

@ -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%">&nbsp;<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

View File

@ -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: {

View File

@ -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

View File

@ -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%">&nbsp;<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',

View File

@ -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%">&nbsp;<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: {