reload frontend when consistency is fixed

This commit is contained in:
zadam
2021-09-12 11:18:06 +02:00
parent 3f2ee4aefd
commit 9b9be5d155
4 changed files with 69 additions and 49 deletions

View File

@@ -50,6 +50,12 @@ function load() {
log.info(`Becca (note cache) load took ${Date.now() - start}ms`);
}
function reload() {
load();
require('../services/ws').reloadFrontend();
}
function postProcessEntityUpdate(entityName, entity) {
if (entityName === 'branches') {
branchUpdated(entity);
@@ -221,5 +227,6 @@ eventService.subscribe(eventService.LEAVE_PROTECTED_SESSION, load);
module.exports = {
load,
reload,
beccaLoaded
};