crawlnicle/src/handlers/logout.rs

9 lines
173 B
Rust
Raw Normal View History

2023-09-25 05:35:26 +00:00
use axum::response::Redirect;
use crate::models::user::AuthContext;
pub async fn get(mut auth: AuthContext) -> Redirect {
auth.logout().await;
Redirect::to("/")
}