mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-24 09:48:32 +02:00
23 lines
565 B
Rust
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())
|
|
}
|