Rewrite to a API trait.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
|
||||
use gamenight_api_client_rs::{apis::default_api::post_gamenight, models};
|
||||
use inquire::{CustomType, DateSelect, Text};
|
||||
use chrono::{self, Local, NaiveTime};
|
||||
|
||||
use gamenight_api_client_rs::models;
|
||||
use super::*;
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -32,7 +31,7 @@ impl<'a> Flow<'a> for AddGamenight {
|
||||
.to_utc()
|
||||
.to_rfc3339();
|
||||
let add_gamenight = models::AddGamenightRequestBody::new(name, datetime);
|
||||
post_gamenight(&state.api_configuration, Some(add_gamenight)).await?;
|
||||
state.api.post_gamenight(Some(add_gamenight)).await?;
|
||||
|
||||
clear_screen::clear();
|
||||
return Ok((FlowOutcome::Successful, state))
|
||||
|
||||
Reference in New Issue
Block a user