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,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))