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:
Carlos Valente
2025-06-06 21:08:30 +02:00
committed by arc-alex
parent f3b4ea0155
commit 2498e59156
75 changed files with 2060 additions and 2480 deletions
@@ -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(