From 2a313f28fcb8675223708b0657de7517a3281095 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 17 Apr 2024 12:27:21 -0400 Subject: restoring eslint - updates not complete yet --- src/client/Network.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/client/Network.ts') diff --git a/src/client/Network.ts b/src/client/Network.ts index cdcd5225a..968c407b2 100644 --- a/src/client/Network.ts +++ b/src/client/Network.ts @@ -1,5 +1,6 @@ -import { Utils } from '../Utils'; import * as requestPromise from 'request-promise'; +import { ClientUtils } from '../ClientUtils'; +import { Utils } from '../Utils'; import { Upload } from '../server/SharedMediaTypes'; /** @@ -14,7 +15,7 @@ export namespace Networking { export async function PostToServer(relativeRoute: string, body?: any) { const options = { - uri: Utils.prepend(relativeRoute), + uri: ClientUtils.prepend(relativeRoute), method: 'POST', body, json: true, @@ -49,14 +50,14 @@ export namespace Networking { } const maxFileSize = 50000000; if (fileguidpairs.some(f => f.file.size > maxFileSize)) { - return new Promise(res => + return new Promise(res => { res([ { source: { name: '', type: '', size: 0, toJson: () => ({ name: '', type: '' }) }, result: { name: '', message: `max file size (${maxFileSize / 1000000}MB) exceeded` }, }, - ]) - ); + ]); + }); } formData.set('fileguids', fileguidpairs.map(pair => pair.guid).join(';')); formData.set('filesize', fileguidpairs.reduce((sum, pair) => sum + pair.file.size, 0).toString()); -- cgit v1.2.3-70-g09d2