mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 18:03:47 +00:00
refactor: migrate custom fields to transactions
refactor: extract functions to api domain refactor: strict custom field parsing refactor: remove rundown cache utilities refactor: directory restructure
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
* Google Sheets
|
||||
*/
|
||||
|
||||
import type { AuthenticationStatus, CustomFields, ErrorResponse, Rundown } from 'ontime-types';
|
||||
import { getErrorMessage } from 'ontime-utils';
|
||||
|
||||
import { Request, Response } from 'express';
|
||||
import { readFileSync } from 'fs';
|
||||
|
||||
import type { AuthenticationStatus, CustomFields, ErrorResponse, Rundown } from 'ontime-types';
|
||||
|
||||
import { deleteFile } from '../../utils/parserUtils.js';
|
||||
import {
|
||||
revoke,
|
||||
handleClientSecret,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
upload,
|
||||
getWorksheetOptions,
|
||||
} from '../../services/sheet-service/SheetService.js';
|
||||
import { getErrorMessage } from 'ontime-utils';
|
||||
import { deleteFile } from '../../utils/fileManagement.js';
|
||||
|
||||
export async function requestConnection(
|
||||
req: Request,
|
||||
@@ -40,11 +40,7 @@ export async function requestConnection(
|
||||
}
|
||||
|
||||
// delete uploaded file after parsing
|
||||
try {
|
||||
await deleteFile(filePath);
|
||||
} catch (_error) {
|
||||
/** we dont handle failure here */
|
||||
}
|
||||
await deleteFile(filePath);
|
||||
}
|
||||
|
||||
export async function verifyAuthentication(
|
||||
|
||||
Reference in New Issue
Block a user