mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
setup api
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// import json with initial data
|
||||
const events = require('../data/eventsData.json');
|
||||
|
||||
// Create controller for GET request to '/events'
|
||||
// Returns ACK message
|
||||
exports.eventsGet = async (req, res) => {
|
||||
res.send({ response: 'Events Controller API' });
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/events/all'
|
||||
// Returns playback state object
|
||||
exports.eventsGetAll = async (req, res) => {
|
||||
res.json(events);
|
||||
};
|
||||
Reference in New Issue
Block a user