delete notifications ignored
This commit is contained in:
parent
9633e4f4c6
commit
860c70c4a1
@ -11,18 +11,16 @@ authors = ["ntr <ntr@smokestack.io>"]
|
|||||||
# rpath = true
|
# rpath = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand = "0.6"
|
|
||||||
uuid = { version = "0.5", features = ["serde", "v4"] }
|
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_derive = "1"
|
serde_derive = "1"
|
||||||
serde_cbor = "0.9"
|
serde_cbor = "0.9"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
||||||
|
rand = "0.6"
|
||||||
|
uuid = { version = "0.5", features = ["serde", "v4"] }
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
|
||||||
bcrypt = "0.2"
|
bcrypt = "0.2"
|
||||||
|
|
||||||
dotenv = "0.9.0"
|
|
||||||
postgres = { version = "0.15", features = ["with-uuid", "with-chrono"] }
|
postgres = { version = "0.15", features = ["with-uuid", "with-chrono"] }
|
||||||
r2d2 = "*"
|
r2d2 = "*"
|
||||||
r2d2_postgres = "*"
|
r2d2_postgres = "*"
|
||||||
@ -30,6 +28,7 @@ fallible-iterator = "0.1"
|
|||||||
|
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
|
|
||||||
|
dotenv = "0.9.0"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
fern = "0.5"
|
fern = "0.5"
|
||||||
|
|
||||||
@ -43,6 +42,6 @@ crossbeam-channel = "0.3"
|
|||||||
|
|
||||||
stripe-rust = { version = "0.10.4", features = ["webhooks"] }
|
stripe-rust = { version = "0.10.4", features = ["webhooks"] }
|
||||||
|
|
||||||
[patch.crates-io]
|
# [patch.crates-io]
|
||||||
# stripe-rust = { git = "https://github.com/margh/stripe-rs.git" }
|
# stripe-rust = { git = "https://github.com/margh/stripe-rs.git" }
|
||||||
|
|
||||||
|
|||||||
@ -51,11 +51,14 @@ fn handle_notification(n: Notification, db: &Db, pss: &Sender<Message>) -> Resul
|
|||||||
// maybe we need it
|
// maybe we need it
|
||||||
let mut tx = db.transaction()?;
|
let mut tx = db.transaction()?;
|
||||||
|
|
||||||
let msg = match n.table {
|
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::Accounts => Message::Account(account::select(db, n.id)?),
|
||||||
Table::Instances => Message::Instance(instance::instance_get(&mut tx, n.id)?),
|
Table::Instances => Message::Instance(instance::instance_get(&mut tx, n.id)?),
|
||||||
Table::Games => Message::Game(game::game_get(&mut tx, n.id)?),
|
Table::Games => Message::Game(game::game_get(&mut tx, n.id)?),
|
||||||
_ => return Err(format_err!("unimplemented notification {:?}", n)),
|
_ => return Err(format_err!("unimplemented notification {:?}", n)),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
tx.commit()?;
|
tx.commit()?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user