Converted the Api to a Restful api.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use gamenight_api_client_rs::models::GameId;
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::{Flow, FlowOutcome, FlowResult, GamenightState};
|
||||
@@ -22,7 +21,7 @@ impl Disown {
|
||||
#[async_trait]
|
||||
impl<'a> Flow<'a> for Disown {
|
||||
async fn run(&self, state: &'a mut GamenightState) -> FlowResult<'a> {
|
||||
let _ = state.api.disown_post(Some(GameId{game_id: self.game_id.to_string()})).await?;
|
||||
let _ = state.api.delete_game_owner(&self.game_id.to_string(), &state.get_user_id()?.to_string()).await?;
|
||||
|
||||
clear_screen::clear();
|
||||
Ok((FlowOutcome::Successful, state))
|
||||
|
||||
Reference in New Issue
Block a user