restore rundownGetAll

This commit is contained in:
arc-alex
2024-07-29 12:20:18 +02:00
parent c5e821df35
commit 807698aee1
2 changed files with 16 additions and 2 deletions
@@ -1,4 +1,11 @@
import { ErrorResponse, MessageResponse, OntimeRundownEntry, RundownCached, RundownPaginated } from 'ontime-types';
import {
ErrorResponse,
MessageResponse,
OntimeRundown,
OntimeRundownEntry,
RundownCached,
RundownPaginated,
} from 'ontime-types';
import { getErrorMessage } from 'ontime-utils';
import { Request, Response } from 'express';
@@ -21,6 +28,11 @@ import {
getRundown,
} from '../../services/rundown-service/rundownUtils.js';
export async function rundownGetAll(_req: Request, res: Response<OntimeRundown>) {
const rundown = getRundown();
res.json(rundown);
}
export async function rundownGetNormalised(_req: Request, res: Response<RundownCached>) {
const cachedRundown = getNormalisedRundown();
res.json(cachedRundown);
@@ -5,6 +5,7 @@ import {
rundownApplyDelay,
rundownBatchPut,
rundownDelete,
rundownGetAll,
rundownGetById,
rundownGetNormalised,
rundownGetPaginated,
@@ -26,7 +27,8 @@ import {
export const router = express.Router();
router.get('/', rundownGetPaginatedQueryParams, rundownGetPaginated); // not used in Ontime frontend
router.get('/', rundownGetAll); // not used in Ontime frontend
router.get('/paginated', rundownGetPaginatedQueryParams, rundownGetPaginated); // not used in Ontime frontend
router.get('/normalised', rundownGetNormalised);
router.get('/:eventId', paramsMustHaveEventId, rundownGetById); // not used in Ontime frontend