//! Unauthenticated, read-only endpoints safe to expose before a user has joined. use axum::extract::State; use axum::Json; use serde::Serialize; use crate::state::AppState; #[derive(Serialize)] pub struct PublicEventDto { pub name: String, pub slug: String, } /// Public event identity, used by the pre-auth join/recover screens so a guest can /// see *which* event they're joining. Only the display name and slug are exposed — /// nothing user-scoped — so this is safe without a token. Served straight from the /// instance config (no DB round-trip needed). pub async fn get_public_event(State(state): State) -> Json { Json(PublicEventDto { name: state.config.event_name.clone(), slug: state.config.event_slug.clone(), }) }