ESLint auto fixes

This commit is contained in:
2025-04-03 22:32:09 +02:00
parent f012572936
commit 92ce2e68ad
14 changed files with 51 additions and 45 deletions

View File

@ -44,7 +44,7 @@ export class APIClient {
*/
static async exec(args: RequestParams): Promise<APIResponse> {
let body: string | undefined | FormData = undefined;
let headers: any = {};
const headers: any = {};
// JSON request
if (args.jsonData) {
@ -67,17 +67,17 @@ export class APIClient {
const res: XMLHttpRequest = await new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", (e) =>
args.upProgress!(e.loaded / e.total)
{ args.upProgress!(e.loaded / e.total); }
);
xhr.addEventListener("load", () => resolve(xhr));
xhr.addEventListener("load", () => { resolve(xhr); });
xhr.addEventListener("error", () =>
reject(new Error("File upload failed"))
{ reject(new Error("File upload failed")); }
);
xhr.addEventListener("abort", () =>
reject(new Error("File upload aborted"))
{ reject(new Error("File upload aborted")); }
);
xhr.addEventListener("timeout", () =>
reject(new Error("File upload timeout"))
{ reject(new Error("File upload timeout")); }
);
xhr.open(args.method, url, true);
xhr.withCredentials = true;