mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 19:33:46 +00:00
feat: goto with osc
This commit is contained in:
@@ -56,6 +56,7 @@ const initiateOSC = (config) => {
|
||||
break;
|
||||
case 'goto':
|
||||
console.log('calling goto with', args);
|
||||
global.timer.loadEventById(args.toLowerCase());
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
const db = require('../app.js').db;
|
||||
|
||||
// utils
|
||||
const { nanoid } = require('nanoid');
|
||||
const customAlphabet = require('nanoid').customAlphabet;
|
||||
const nanoid = customAlphabet('1234567890abcdef', 4);
|
||||
const eventDefs = require('../data/eventsDefinition.js');
|
||||
|
||||
function _getEventsCount() {
|
||||
@@ -85,7 +86,7 @@ exports.eventsPost = async (req, res) => {
|
||||
|
||||
// ensure structure
|
||||
let newEvent = {};
|
||||
req.body.id = nanoid(6);
|
||||
req.body.id = nanoid();
|
||||
|
||||
switch (req.body.type) {
|
||||
case 'event':
|
||||
|
||||
Reference in New Issue
Block a user