feat: visitors and load analytics middleware

This commit is contained in:
Per Stark
2025-01-24 10:51:45 +01:00
parent 703480e8b3
commit 03c3347652
6 changed files with 39 additions and 7 deletions

View File

@@ -1,15 +1,13 @@
use axum::{
extract::State,
http::{StatusCode, Uri},
response::{IntoResponse, Redirect},
};
use axum_htmx::HxRedirect;
use axum_session_auth::AuthSession;
use axum_session_surreal::SessionSurrealPool;
use surrealdb::{engine::any::Any, Surreal};
use crate::{
error::{AppError, HtmlError},
error::HtmlError,
page_data,
server::{routes::html::render_template, AppState},
storage::types::{analytics::Analytics, system_settings::SystemSettings, user::User},

View File

@@ -7,10 +7,8 @@ use axum::{
use axum_htmx::{HxBoosted, HxRedirect};
use axum_session_auth::AuthSession;
use axum_session_surreal::SessionSurrealPool;
use chrono::RoundingError;
use serde::{Deserialize, Serialize};
use surrealdb::{engine::any::Any, Surreal};
use tracing::info;
use crate::{error::HtmlError, server::AppState, storage::types::user::User};