mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Reload data when entries or treatments are deleted
This commit is contained in:
@@ -97,7 +97,11 @@ function storage (env, ctx) {
|
||||
}
|
||||
|
||||
function remove (opts, fn) {
|
||||
return api( ).remove(query_for(opts), fn);
|
||||
return api( ).remove(query_for(opts), function (err, stat) {
|
||||
//TODO: this is triggering a read from Mongo, we can do better
|
||||
ctx.bus.emit('data-received');
|
||||
fn(err, stat);
|
||||
});
|
||||
}
|
||||
|
||||
function save (obj, fn) {
|
||||
|
||||
Reference in New Issue
Block a user