Files
minne/crates/html-router/src/routes/gdpr.rs
2025-03-04 07:44:00 +01:00

23 lines
565 B
Rust

use axum::response::{Html, IntoResponse};
use axum_session::Session;
use axum_session_surreal::SessionSurrealPool;
use surrealdb::engine::any::Any;
use common::error::HtmlError;
pub async fn accept_gdpr(
session: Session<SessionSurrealPool<Any>>,
) -> Result<impl IntoResponse, HtmlError> {
session.set("gdpr_accepted", true);
Ok(Html("").into_response())
}
pub async fn deny_gdpr(
session: Session<SessionSurrealPool<Any>>,
) -> Result<impl IntoResponse, HtmlError> {
session.set("gdpr_accepted", true);
Ok(Html("").into_response())
}