mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 23:19:09 +00:00
refactor: add sendRefetch on fileupload (#396)
Co-authored-by: Fabian Posenau <fabian@fphome.de>
This commit is contained in:
@@ -11,6 +11,7 @@ import { resolveDbPath } from '../setup.js';
|
|||||||
import { oscIntegration } from '../services/integration-service/OscIntegration.js';
|
import { oscIntegration } from '../services/integration-service/OscIntegration.js';
|
||||||
import { logger } from '../classes/Logger.js';
|
import { logger } from '../classes/Logger.js';
|
||||||
import { deleteAllEvents } from '../services/RundownService.js';
|
import { deleteAllEvents } from '../services/RundownService.js';
|
||||||
|
import { sendRefetch } from '../adapters/websocketAux.js';
|
||||||
|
|
||||||
// Create controller for GET request to '/ontime/poll'
|
// Create controller for GET request to '/ontime/poll'
|
||||||
// Returns data for current state
|
// Returns data for current state
|
||||||
@@ -70,6 +71,7 @@ const uploadAndParse = async (file, req, res, options) => {
|
|||||||
await DataProvider.mergeIntoData(result.data);
|
await DataProvider.mergeIntoData(result.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sendRefetch();
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
} else {
|
} else {
|
||||||
res.status(400).send({ message: 'Failed parsing, no data' });
|
res.status(400).send({ message: 'Failed parsing, no data' });
|
||||||
|
|||||||
Reference in New Issue
Block a user