adds selling procedure for 'group'

This commit is contained in:
2019-10-26 10:58:03 +02:00
parent 74ee4a831b
commit 49dfd8bb14
2 changed files with 19 additions and 19 deletions

View File

@@ -109,10 +109,7 @@ fn configure_app(config: &mut web::ServiceConfig) {
))
.route(web::delete().to_async(
move |pool, (player, data): (PlayerId, web::Json<api::SellParams>)| {
match *player {
0 => db_call(pool, Q::SellItems(*player, data.into_inner().items)),
_ => db_call(pool, Q::SellGroupItems(*player, data.into_inner())),
}
db_call(pool, Q::SellItems(*player, data.into_inner()))
},
)),
),