delete notifications ignored

This commit is contained in:
ntr
2019-07-18 12:50:52 +10:00
parent 9633e4f4c6
commit 860c70c4a1
2 changed files with 12 additions and 10 deletions
+8 -5
View File
@@ -51,11 +51,14 @@ fn handle_notification(n: Notification, db: &Db, pss: &Sender<Message>) -> Resul
// maybe we need it
let mut tx = db.transaction()?;
let msg = match n.table {
Table::Accounts => Message::Account(account::select(db, n.id)?),
Table::Instances => Message::Instance(instance::instance_get(&mut tx, n.id)?),
Table::Games => Message::Game(game::game_get(&mut tx, n.id)?),
_ => return Err(format_err!("unimplemented notification {:?}", n)),
let msg = match n.action {
Action::Delete => return Err(format_err!("unimplemented delete notification {:?}", n)),
_ => match n.table {
Table::Accounts => Message::Account(account::select(db, n.id)?),
Table::Instances => Message::Instance(instance::instance_get(&mut tx, n.id)?),
Table::Games => Message::Game(game::game_get(&mut tx, n.id)?),
_ => return Err(format_err!("unimplemented notification {:?}", n)),
},
};
tx.commit()?;