church-api/temp_list_pending.txt
Benjamin Slingo 0c06e159bb Initial commit: Church API Rust implementation
Complete church management system with bulletin management, media processing, live streaming integration, and web interface. Includes authentication, email notifications, database migrations, and comprehensive test suite.
2025-08-19 20:56:41 -04:00

13 lines
432 B
Plaintext

pub async fn list_pending(
Query(params): Query<PaginationParams>,
State(state): State<AppState>,
) -> Result<Json<ApiResponse<(Vec<PendingEvent>, i64)>>> {
let (events, total) = crate::db::events::list_pending(&state.pool, params.page.unwrap_or(1) as i32, params.per_page.unwrap_or(10)).await?;
Ok(Json(ApiResponse {
success: true,
data: Some((events, total)),
message: None,
}))
}