Add configurable napola rule with instant win on a full denari sweep
This commit is contained in:
+2
-2
@@ -35,9 +35,9 @@ pub async fn game_types() -> Result<Vec<GameTypeInfo>, String> {
|
||||
Ok(page.results)
|
||||
}
|
||||
|
||||
pub async fn create_game(game_type: &str, target_score: i32) -> Result<GameView, String> {
|
||||
pub async fn create_game(game_type: &str, target_score: i32, napola: bool) -> Result<GameView, String> {
|
||||
let resp = Request::post("/api/games")
|
||||
.json(&serde_json::json!({ "game_type": game_type, "target_score": target_score }))
|
||||
.json(&serde_json::json!({ "game_type": game_type, "target_score": target_score, "napola": napola }))
|
||||
.map_err(|e| e.to_string())?
|
||||
.send()
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user