mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-31 03:40:38 +02:00
wip: heavy refactoring html routers
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user