Init
This commit is contained in:
20
src/network/http/context.rs
Normal file
20
src/network/http/context.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
use std::time::Instant;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::app::AppState;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RequestContext {
|
||||
pub request_id: Uuid,
|
||||
pub started_at: Instant,
|
||||
pub method: axum::http::Method,
|
||||
pub uri: axum::http::Uri,
|
||||
pub user: Option<CurrentUser>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CurrentUser {
|
||||
pub id: Uuid,
|
||||
pub username: String,
|
||||
}
|
||||
Reference in New Issue
Block a user