mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 00:13:53 +00:00
folder restructure
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id":"xxxxx0",
|
||||
"duration": 300000,
|
||||
"type": "delay"
|
||||
},
|
||||
{
|
||||
"id":"xxxxx1",
|
||||
"title": "Is the internet a fad?",
|
||||
"subtitle": "It is",
|
||||
"presenter": "Carlos Valente",
|
||||
"timeStart": 32400000,
|
||||
"timeEnd": 34200000,
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"id":"xxxxx2",
|
||||
"duration": 1500000,
|
||||
"type": "delay"
|
||||
},
|
||||
{
|
||||
"id":"xxxxx3",
|
||||
"title": "Is reddit a dictatorship?",
|
||||
"subtitle": "It is",
|
||||
"presenter": "Carlos Valente",
|
||||
"timeStart": 34200000,
|
||||
"timeEnd": 36000000,
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"id":"xxxxx4",
|
||||
"title": "Out of words",
|
||||
"subtitle": "",
|
||||
"presenter": "Carlos Valente",
|
||||
"timeStart": 36000000,
|
||||
"timeEnd": 39600000,
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"id":"xxxxx5",
|
||||
"title": "Really",
|
||||
"subtitle": "",
|
||||
"presenter": "Carlos Valente",
|
||||
"timeStart": 39600000,
|
||||
"timeEnd": 41400000,
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"id":"xxxxx6",
|
||||
"title": "...",
|
||||
"subtitle": "",
|
||||
"presenter": "Carlos Valente",
|
||||
"timeStart": null,
|
||||
"timeEnd": null,
|
||||
"type": "event"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// get config
|
||||
import { config } from './config.js';
|
||||
import { config } from './config/config.js';
|
||||
|
||||
// init database
|
||||
import { Low, JSONFile } from 'lowdb';
|
||||
@@ -66,7 +66,7 @@ async function parsev1(jsonData) {
|
||||
publicInfo: e.publicInfo,
|
||||
backstageInfo: e.backstageInfo,
|
||||
};
|
||||
console.log(event);
|
||||
|
||||
// write to db
|
||||
db.data.event = event;
|
||||
db.write();
|
||||
+11
-11
@@ -1,64 +1,64 @@
|
||||
// Create controller for GET request to '/playback'
|
||||
// Returns ACK message
|
||||
exports.pbGet = async (req, res) => {
|
||||
export const pbGet = async (req, res) => {
|
||||
res.send(global.timer.playState);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/start'
|
||||
// Starts timer object
|
||||
exports.pbStart = async (req, res) => {
|
||||
export const pbStart = async (req, res) => {
|
||||
global.timer.start();
|
||||
res.sendStatus(200);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/pause'
|
||||
// Pauses timer object
|
||||
exports.pbPause = async (req, res) => {
|
||||
export const pbPause = async (req, res) => {
|
||||
global.timer.pause();
|
||||
res.sendStatus(200);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/stop'
|
||||
// Stops timer object
|
||||
exports.pbStop = async (req, res) => {
|
||||
export const pbStop = async (req, res) => {
|
||||
global.timer.stop();
|
||||
res.sendStatus(200);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/roll'
|
||||
// Sets timer object to roll mode
|
||||
exports.pbRoll = async (req, res) => {
|
||||
export const pbRoll = async (req, res) => {
|
||||
global.timer.roll();
|
||||
res.sendStatus(501);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/previous'
|
||||
// Sets timer object to roll mode
|
||||
exports.pbPrevious = async (req, res) => {
|
||||
export const pbPrevious = async (req, res) => {
|
||||
global.timer.previous();
|
||||
res.sendStatus(200);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/next'
|
||||
// Sets timer object to roll mode
|
||||
exports.pbNext = async (req, res) => {
|
||||
export const pbNext = async (req, res) => {
|
||||
global.timer.next();
|
||||
res.sendStatus(200);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/unload'
|
||||
// Unloads any events
|
||||
exports.pbUnload = async (req, res) => {
|
||||
export const pbUnload = async (req, res) => {
|
||||
global.timer.unload();
|
||||
console.log('debug: unload called')
|
||||
console.log('debug: unload called');
|
||||
|
||||
res.sendStatus(200);
|
||||
};
|
||||
|
||||
// Create controller for GET request to '/playback/reload'
|
||||
// Reloads current event
|
||||
exports.pbReload = async (req, res) => {
|
||||
export const pbReload = async (req, res) => {
|
||||
global.timer.reload();
|
||||
console.log('debug: reload called')
|
||||
console.log('debug: reload called');
|
||||
res.sendStatus(200);
|
||||
};
|
||||
@@ -2,7 +2,7 @@ import multer from 'multer';
|
||||
|
||||
const storage = multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
cb(null, './uploads');
|
||||
cb(null, 'uploads/');
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
cb(null, Date.now() + '--' + file.originalname);
|
||||
Reference in New Issue
Block a user