mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
restore rundownGetAll
This commit is contained in:
@@ -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 { getErrorMessage } from 'ontime-utils';
|
||||||
|
|
||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
@@ -21,6 +28,11 @@ import {
|
|||||||
getRundown,
|
getRundown,
|
||||||
} from '../../services/rundown-service/rundownUtils.js';
|
} 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>) {
|
export async function rundownGetNormalised(_req: Request, res: Response<RundownCached>) {
|
||||||
const cachedRundown = getNormalisedRundown();
|
const cachedRundown = getNormalisedRundown();
|
||||||
res.json(cachedRundown);
|
res.json(cachedRundown);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
rundownApplyDelay,
|
rundownApplyDelay,
|
||||||
rundownBatchPut,
|
rundownBatchPut,
|
||||||
rundownDelete,
|
rundownDelete,
|
||||||
|
rundownGetAll,
|
||||||
rundownGetById,
|
rundownGetById,
|
||||||
rundownGetNormalised,
|
rundownGetNormalised,
|
||||||
rundownGetPaginated,
|
rundownGetPaginated,
|
||||||
@@ -26,7 +27,8 @@ import {
|
|||||||
|
|
||||||
export const router = express.Router();
|
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('/normalised', rundownGetNormalised);
|
||||||
router.get('/:eventId', paramsMustHaveEventId, rundownGetById); // not used in Ontime frontend
|
router.get('/:eventId', paramsMustHaveEventId, rundownGetById); // not used in Ontime frontend
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user