mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
Fix/events enpoint (#329)
This commit is contained in:
@@ -9,19 +9,19 @@ import {
|
||||
reorderEvent,
|
||||
} from '../services/RundownService.ts';
|
||||
|
||||
// Create controller for GET request to '/eventlist'
|
||||
// Create controller for GET request to '/events'
|
||||
// Returns -
|
||||
export const rundownGetAll = async (req, res) => {
|
||||
res.json(DataProvider.getRundown());
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/eventlist/:eventId'
|
||||
// Create controller for GET request to '/events/:eventId'
|
||||
// Returns -
|
||||
export const getEventById = async (req, res) => {
|
||||
res.json(DataProvider.getEventById(req.params?.eventId));
|
||||
};
|
||||
|
||||
// Create controller for POST request to '/eventlist/'
|
||||
// Create controller for POST request to '/events/'
|
||||
// Returns -
|
||||
export const rundownPost = async (req, res) => {
|
||||
if (failEmptyObjects(req.body, res)) {
|
||||
@@ -36,7 +36,7 @@ export const rundownPost = async (req, res) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Create controller for PUT request to '/eventlist/'
|
||||
// Create controller for PUT request to '/events/'
|
||||
// Returns -
|
||||
export const rundownPut = async (req, res) => {
|
||||
if (failEmptyObjects(req.body, res)) {
|
||||
@@ -65,7 +65,7 @@ export const rundownReorder = async (req, res) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Create controller for PATCH request to '/eventlist/applydelay/:eventId'
|
||||
// Create controller for PATCH request to '/events/applydelay/:eventId'
|
||||
// Returns -
|
||||
export const rundownApplyDelay = async (req, res) => {
|
||||
try {
|
||||
@@ -76,7 +76,7 @@ export const rundownApplyDelay = async (req, res) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Create controller for DELETE request to '/eventlist/:eventId'
|
||||
// Create controller for DELETE request to '/events/:eventId'
|
||||
// Returns -
|
||||
export const deleteEventById = async (req, res) => {
|
||||
try {
|
||||
@@ -87,7 +87,7 @@ export const deleteEventById = async (req, res) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Create controller for DELETE request to '/eventlist/'
|
||||
// Create controller for DELETE request to '/events/'
|
||||
// Returns -
|
||||
export const rundownDelete = async (req, res) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user