feat: Type-erase Database backend for simpler code
This commit is contained in:
parent
9933990fd3
commit
ccbd97b836
17 changed files with 108 additions and 117 deletions
|
|
@ -2,12 +2,11 @@ use axum::extract::State;
|
|||
use axum::response::{IntoResponse, Redirect, Response};
|
||||
use axum_extra::extract::cookie::CookieJar;
|
||||
|
||||
use crate::db::DatabaseInterface;
|
||||
use crate::http::login::{LoginError, login_page};
|
||||
use crate::http::{HttpState, OptionalHttpSession};
|
||||
|
||||
pub async fn logout<D: DatabaseInterface>(
|
||||
State(state): State<HttpState<D>>,
|
||||
pub async fn logout(
|
||||
State(state): State<HttpState>,
|
||||
session: Option<OptionalHttpSession>,
|
||||
cookies: CookieJar,
|
||||
) -> Response {
|
||||
|
|
|
|||
Loading…
Reference in a new issue