d5939db
use axum::extract::State;
use crate::config::AgreementDoc;
use crate::error::AuthError;
use crate::features::AuthService;
use export::data::AppResponseData;
#[utoipa::path(
get,
path = "/auth/agreements",
tag = "auth",
responses(
(status = 200, description = "List of agreement documents (terms, privacy).", body = AppResponseData<Vec<AgreementDoc>>),
),
)]
pub(crate) async fn handler(
State(svc): State<AuthService>,
) -> Result<AppResponseData<Vec<AgreementDoc>>, AuthError> {
Ok(AppResponseData::ok(svc.list_agreements()))
}