Rewrite to a API trait.

This commit is contained in:
2026-01-11 14:12:54 +01:00
parent ea9f05b048
commit 88f8cf76ef
45 changed files with 1384 additions and 1030 deletions

View File

@@ -1,7 +1,7 @@
use std::fmt::Display;
use async_trait::async_trait;
use gamenight_api_client_rs::{apis::default_api::disown_post, models::GameId};
use gamenight_api_client_rs::models::GameId;
use uuid::Uuid;
use super::{Flow, FlowOutcome, FlowResult, GamenightState};
@@ -22,7 +22,7 @@ impl Disown {
#[async_trait]
impl<'a> Flow<'a> for Disown {
async fn run(&self, state: &'a mut GamenightState) -> FlowResult<'a> {
let _ = disown_post(&state.api_configuration, Some(GameId{game_id: self.game_id.to_string()})).await?;
let _ = state.api.disown_post(Some(GameId{game_id: self.game_id.to_string()})).await?;
clear_screen::clear();
Ok((FlowOutcome::Successful, state))