no team selected err msg

This commit is contained in:
ntr
2019-01-08 15:56:20 +11:00
parent e1161d8ce8
commit ef5b2acd6c
2 changed files with 4 additions and 2 deletions
+4
View File
@@ -678,6 +678,10 @@ pub fn game_pve_new(cryp_ids: Vec<Uuid>, mode: PveMode, tx: &mut Transaction, ac
.map(|id| cryp_get(tx, *id, account.id))
.collect::<Result<Vec<Cryp>, Error>>()?;
if cryps.len() == 0 {
return Err(err_msg("no cryps selected"));
}
if cryps.len() > 3 {
return Err(err_msg("team size too large (3 max)"));
}