Implemented deleting games as admin.

This commit is contained in:
2026-01-02 15:24:38 +01:00
parent 0c256846f6
commit 5c928b30f3
26 changed files with 344 additions and 133 deletions

View File

@@ -0,0 +1,25 @@
use std::fmt::{Display, Formatter};
use gamenight_api_client_rs::models::Location;
use uuid::Uuid;
use crate::flows::FlowError;
pub struct LocationSelectData {
pub id: Uuid,
pub name: String,
}
impl Display for LocationSelectData {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.name) }
}
impl TryFrom<&Location> for LocationSelectData {
type Error = FlowError;
fn try_from(value: &Location) -> Result<Self, Self::Error> {
let uuid = Uuid::parse_str(&value.id)?;
Ok(LocationSelectData {
id: uuid,
name: value.name.clone(),
})
}
}