From 2e23718d73f99297ecd96b890d5e31723d53232f Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Sat, 15 Mar 2025 09:04:33 +0100 Subject: [PATCH] refactor: restructure model to contain an object of rundowns --- apps/server/src/services/sheet-service/SheetService.ts | 4 ++-- apps/server/src/utils/parser.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/server/src/services/sheet-service/SheetService.ts b/apps/server/src/services/sheet-service/SheetService.ts index 44eac4d15..4e51dbca3 100644 --- a/apps/server/src/services/sheet-service/SheetService.ts +++ b/apps/server/src/services/sheet-service/SheetService.ts @@ -13,8 +13,8 @@ import got from 'got'; import { parseExcel } from '../../utils/parser.js'; import { logger } from '../../classes/Logger.js'; -import { parseRundowns } from '../../utils/parserFunctions.js'; -import { getCurrentRundown, getRundownOrThrow } from '../rundown-service/rundownUtils.js'; +import { parseRundown } from '../../utils/parserFunctions.js'; +import { getRundown } from '../rundown-service/rundownUtils.js'; import { getCustomFields } from '../rundown-service/rundownCache.js'; import { cellRequestFromEvent, type ClientSecret, getA1Notation, isClientSecret } from './sheetUtils.js'; diff --git a/apps/server/src/utils/parser.ts b/apps/server/src/utils/parser.ts index abd4de87b..67573fc99 100644 --- a/apps/server/src/utils/parser.ts +++ b/apps/server/src/utils/parser.ts @@ -24,6 +24,8 @@ import { TimeStrategy, } from 'ontime-types'; +import { Merge } from 'ts-essentials'; + import { parseAutomationSettings } from '../api-data/automation/automation.parser.js'; import { logger } from '../classes/Logger.js'; import { event as eventDef } from '../models/eventsDefinition.js'; @@ -31,7 +33,6 @@ import { event as eventDef } from '../models/eventsDefinition.js'; import { makeString } from './parserUtils.js'; import { parseProject, parseRundowns, parseSettings, parseUrlPresets, parseViewSettings } from './parserFunctions.js'; import { parseExcelDate } from './time.js'; -import { Merge } from 'ts-essentials'; import { is } from './is.js'; export type ErrorEmitter = (message: string) => void;