mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 11:53:49 +00:00
3603b836f6
* refactor: typescript migration * chore: remove prop-types package * refactor: file structure * refactor: migrate ontime table to tanstack table 8 * refactor: rundown controller uses service as data source * refactor: convert to typescript * feat: caching store * refactor: add delay values to rundown * feat: toggle past visibility * chore: update tests * refactor: add extra fields to CSV * style: show skipped events * chore: add route to navigation menu * style: allow jumping to bottom * chore: add tests
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import express from 'express';
|
|
import {
|
|
deleteEventById,
|
|
rundownApplyDelay,
|
|
rundownDelete,
|
|
rundownGetAll,
|
|
rundownPost,
|
|
rundownPut,
|
|
rundownReorder,
|
|
} from '../controllers/rundownController.js';
|
|
import {
|
|
paramsMustHaveEventId,
|
|
rundownPostValidator,
|
|
rundownPutValidator,
|
|
rundownReorderValidator,
|
|
} from '../controllers/rundownController.validate.js';
|
|
|
|
export const router = express.Router();
|
|
|
|
// create route between controller and '/events/' endpoint
|
|
router.get('/', rundownGetAll);
|
|
|
|
// create route between controller and '/events/' endpoint
|
|
router.post('/', rundownPostValidator, rundownPost);
|
|
|
|
// create route between controller and '/events/' endpoint
|
|
router.put('/', rundownPutValidator, rundownPut);
|
|
|
|
// create route between controller and '/events/reorder' endpoint
|
|
router.patch('/reorder/', rundownReorderValidator, rundownReorder);
|
|
|
|
// create route between controller and '/events/applydelay/:eventId' endpoint
|
|
router.patch('/applydelay/:eventId', paramsMustHaveEventId, rundownApplyDelay);
|
|
|
|
// create route between controller and '/events/all' endpoint
|
|
router.delete('/all', rundownDelete);
|
|
|
|
// create route between controller and '/events/:eventId' endpoint
|
|
router.delete('/:eventId', paramsMustHaveEventId, deleteEventById);
|