From 55a26c05fc1aba7b62e3ed4b3c6aca71c18a72ee Mon Sep 17 00:00:00 2001 From: fflorent Date: Thu, 2 May 2024 17:42:48 +0200 Subject: [PATCH] Minor fixes --- app/common/UserAPI.ts | 4 ++-- app/server/lib/uploads.ts | 4 ++-- test/server/lib/DocApi.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/common/UserAPI.ts b/app/common/UserAPI.ts index aa84ef21..8d39a5eb 100644 --- a/app/common/UserAPI.ts +++ b/app/common/UserAPI.ts @@ -773,7 +773,7 @@ export class UserAPIImpl extends BaseAPI implements UserAPI { } public async getWorker(key: string): Promise { - const json: PublicDocWorkerUrlInfo = (await this.requestJson(`${this._url}/api/worker/${key}`, { + const json = (await this.requestJson(`${this._url}/api/worker/${key}`, { method: 'GET', credentials: 'include' })) as PublicDocWorkerUrlInfo; @@ -1159,7 +1159,7 @@ export class DocAPIImpl extends BaseAPI implements DocAPI { /** * Reprensents information to build public doc worker url. * - * Structure that may contain either **exlusively**: + * Structure that may contain either **exclusively**: * - a selfPrefix when no pool of doc worker exist. * - a public doc worker url otherwise. */ diff --git a/app/server/lib/uploads.ts b/app/server/lib/uploads.ts index 4c519979..dc9ccc55 100644 --- a/app/server/lib/uploads.ts +++ b/app/server/lib/uploads.ts @@ -21,8 +21,8 @@ import * as multiparty from 'multiparty'; import fetch, {Response as FetchResponse} from 'node-fetch'; import * as path from 'path'; import * as tmp from 'tmp'; -import { IDocWorkerMap } from './DocWorkerMap'; -import { getDocWorkerInfoOrSelfPrefix } from './DocWorkerUtils'; +import {IDocWorkerMap} from './DocWorkerMap'; +import {getDocWorkerInfoOrSelfPrefix} from './DocWorkerUtils'; // After some time of inactivity, clean up the upload. We give an hour, which seems generous, // except that if one is toying with import options, and leaves the upload in an open browser idle diff --git a/test/server/lib/DocApi.ts b/test/server/lib/DocApi.ts index 39780dd0..8071dab7 100644 --- a/test/server/lib/DocApi.ts +++ b/test/server/lib/DocApi.ts @@ -158,7 +158,7 @@ describe('DocApi', function () { describe("should work behind a proxy", async () => { let proxy: TestServerProxy; - const originalHeaders = new WeakMap["headers"]>(); + const originalHeaders = new WeakMap(); function iterateOverAccountHeaders ( cb: (account: AxiosRequestConfig) => AxiosRequestConfig["headers"] ) {