feat: Type-erase Database backend for simpler code

This commit is contained in:
selfhoster selfhoster 2026-09-19 14:39:01 +02:00
commit ccbd97b836
17 changed files with 108 additions and 117 deletions

View file

@ -6,8 +6,8 @@ use minijinja::context;
use crate::db::{DatabaseInterface, Operation};
use crate::http::{HttpSession, HttpState};
pub async fn home<D: DatabaseInterface>(
State(state): State<HttpState<D>>,
pub async fn home(
State(state): State<HttpState>,
// Only logged in users are allowed here
session: HttpSession,
) -> Response {