Skip to content

Commit

Permalink
restore rundownGetAll (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-Arc authored Jul 29, 2024
1 parent c789393 commit 67be4a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 13 additions & 1 deletion apps/server/src/api-data/rundown/rundown.controller.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -22,6 +29,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);
Expand Down
4 changes: 3 additions & 1 deletion apps/server/src/api-data/rundown/rundown.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
rundownBatchPut,
rundownDelete,
rundownFrozenPost,
rundownGetAll,
rundownGetById,
rundownGetNormalised,
rundownGetPaginated,
Expand All @@ -29,7 +30,8 @@ import { preventIfFrozen } from './rundown.middleware.js';

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

Expand Down

0 comments on commit 67be4a5

Please sign in to comment.