forked from Roflin/gamenight
Rewrite to a API trait.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use gamenight_api_client_rs::{apis::default_api::rename_game_post, models::RenameGameRequestBody};
|
||||
use gamenight_api_client_rs::models::RenameGameRequestBody;
|
||||
use inquire::Text;
|
||||
|
||||
use crate::domain::game::Game;
|
||||
@@ -32,7 +32,7 @@ impl<'a> Flow<'a> for RenameGame {
|
||||
id: self.game.id.to_string(),
|
||||
name
|
||||
};
|
||||
rename_game_post(&state.api_configuration, Some(req)).await?;
|
||||
state.api.rename_game_post(Some(req)).await?;
|
||||
|
||||
return Ok((FlowOutcome::Successful, state))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user