Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function updateConfig(event, doc) {
if (!doc) return;
let config = configById(doc._id);
if (doc.$set && doc.$set['queue.completed']) {
Beeper.play();
Notify.info({
message: `Run of ${config.name} completed`,
url: `#/config/run/${doc._id}/list`,
target: '_self'
}, {
allow_dismiss: true, delay: 30000
});
}
ConfigListResource.get({id: doc._id}).$promise.then(function(data) {
config.name = data.name;
config.queue = data.queue;
config.type = data.type;
config.archived = data.archived;
updateState(config);