wip: heavy refactoring html routers

This commit is contained in:
Per Stark
2025-03-08 15:47:44 +01:00
parent 812bce27d1
commit 89155130e6
50 changed files with 1130 additions and 987 deletions
+5 -12
View File
@@ -1,22 +1,15 @@
use axum::response::{Html, IntoResponse};
use axum_session::Session;
use axum_session_surreal::SessionSurrealPool;
use surrealdb::engine::any::Any;
use common::error::HtmlError;
use crate::SessionType;
pub async fn accept_gdpr(
session: Session<SessionSurrealPool<Any>>,
) -> Result<impl IntoResponse, HtmlError> {
pub async fn accept_gdpr(session: SessionType) -> impl IntoResponse {
session.set("gdpr_accepted", true);
Ok(Html("").into_response())
Html("").into_response()
}
pub async fn deny_gdpr(
session: Session<SessionSurrealPool<Any>>,
) -> Result<impl IntoResponse, HtmlError> {
pub async fn deny_gdpr(session: SessionType) -> impl IntoResponse {
session.set("gdpr_accepted", true);
Ok(Html("").into_response())
Html("").into_response()
}