add study flow endpoints

This commit is contained in:
2026-04-09 15:17:08 +02:00
parent d45202770e
commit a1dcebaec1
15 changed files with 992 additions and 16 deletions
+15
View File
@@ -0,0 +1,15 @@
use axum::{extract::{Extension, Path}, Json};
use uuid::Uuid;
use crate::{app_state::{AppState, SettlementSnapshot}, error::AppError};
pub async fn show(
Path(event_id): Path<Uuid>,
Extension(state): Extension<AppState>,
) -> Result<Json<SettlementSnapshot>, AppError> {
let Some(settlement) = state.settlement_for_event(event_id).await else {
return Err(AppError::not_found("Settlement not found"));
};
Ok(Json(settlement))
}