impls undoable events

This commit is contained in:
2019-10-28 15:27:26 +01:00
parent 0ac2bce183
commit e9f535ac86
5 changed files with 128 additions and 21 deletions

View File

@@ -112,7 +112,14 @@ fn configure_app(config: &mut web::ServiceConfig) {
db_call(pool, Q::SellItems(*player, data.into_inner()))
},
)),
),
)
.service(
web::scope("/events")
.route("/last", web::delete().to_async(|pool, player: PlayerId| {
db_call(pool, Q::UndoLastAction(*player))
}))
)
),
)
.route("/claims", web::get().to_async(|pool| db_call(pool, Q::FetchClaims)))