persmgr/src/api/user/login.rs
2025-09-06 16:26:26 +03:00

18 lines
436 B
Rust

use axum::{
body::Body,
extract::State,
http::{HeaderMap, HeaderValue, StatusCode},
response::{IntoResponse, Response},
};
use crate::db::Database;
pub async fn route(State(db): State<Database>) -> Response {
Response::builder()
.header("Location", "/")
.header("Set-Cookie", &format!("session=meowmeowmeow"))
.status(StatusCode::SEE_OTHER)
.body(Body::empty())
.unwrap()
}