mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Fixing all eslint's reported error
This commit is contained in:
@@ -18,7 +18,7 @@ import {makeId} from 'app/server/lib/idUtils';
|
||||
import log from 'app/server/lib/log';
|
||||
import {IPermitStore, Permit} from 'app/server/lib/Permit';
|
||||
import {AccessTokenInfo} from 'app/server/lib/AccessTokens';
|
||||
import {allowHost, isEnvironmentAllowedHost, getOriginUrl, optStringParam} from 'app/server/lib/requestUtils';
|
||||
import {allowHost, getOriginUrl, isEnvironmentAllowedHost, optStringParam} from 'app/server/lib/requestUtils';
|
||||
import * as cookie from 'cookie';
|
||||
import {NextFunction, Request, RequestHandler, Response} from 'express';
|
||||
import {IncomingMessage} from 'http';
|
||||
|
||||
@@ -955,8 +955,8 @@ export class DocWorkerApi {
|
||||
const options: DownloadOptions = {
|
||||
...params,
|
||||
filename: name + (params.tableId === name ? '' : '-' + params.tableId),
|
||||
}
|
||||
return options
|
||||
};
|
||||
return options;
|
||||
}
|
||||
|
||||
private _getActiveDoc(req: RequestWithLogin): Promise<ActiveDoc> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {ApiError} from 'app/common/ApiError';
|
||||
import {createFormatter} from 'app/common/ValueFormatter';
|
||||
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
||||
import {ExportData, exportSection, exportTable, Filter, DownloadOptions} from 'app/server/lib/Export';
|
||||
import {DownloadOptions, ExportData, exportSection, exportTable, Filter} from 'app/server/lib/Export';
|
||||
import log from 'app/server/lib/log';
|
||||
import * as bluebird from 'bluebird';
|
||||
import contentDisposition from 'content-disposition';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
||||
import {createExcelFormatter} from 'app/server/lib/ExcelFormatter';
|
||||
import {ExportData, exportDoc, DownloadOptions, exportSection, exportTable, Filter} from 'app/server/lib/Export';
|
||||
import {DownloadOptions, ExportData, exportDoc, exportSection, exportTable, Filter} from 'app/server/lib/Export';
|
||||
import {Alignment, Border, Fill, Workbook} from 'exceljs';
|
||||
import * as express from 'express';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
@@ -923,7 +923,7 @@ export async function backupSqliteDatabase(src: string, dest: string,
|
||||
} finally {
|
||||
if (testProgress) { testProgress({action: 'close', phase: 'before'}); }
|
||||
try {
|
||||
if (db) { await fromCallback(cb => db!.close(cb)); }
|
||||
if (db) { await fromCallback(cb => db.close(cb)); }
|
||||
} catch (err) {
|
||||
_log.debug(null, `problem stopping copy of ${src} (${label}): ${err}`);
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ export class DocTriggers {
|
||||
|
||||
private async _pushToRedisQueue(events: WebHookEvent[]) {
|
||||
const strings = events.map(e => JSON.stringify(e));
|
||||
await this._redisClient!.rpushAsync(this._redisQueueKey, ...strings);
|
||||
await this._redisClient?.rpushAsync(this._redisQueueKey, ...strings);
|
||||
}
|
||||
|
||||
private async _getRedisQueue(redisClient: RedisClient) {
|
||||
|
||||
@@ -108,7 +108,9 @@ export function allowHost(req: Request, allowedHost: string|URL) {
|
||||
// For requests to a native subdomains, only the base domain needs to match.
|
||||
const allowedDomain = parseSubdomain(allowedUrl.hostname);
|
||||
const actualDomain = parseSubdomain(actualUrl.hostname);
|
||||
return (!_.isEmpty(actualDomain) ? actualDomain.base === allowedDomain.base : allowedUrl.hostname === actualUrl.hostname);
|
||||
return (!_.isEmpty(actualDomain) ?
|
||||
actualDomain.base === allowedDomain.base :
|
||||
allowedUrl.hostname === actualUrl.hostname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user