Added user login, logout and creation functionality

Also minor changes to ticketing and AppState
This commit is contained in:
2026-04-24 19:46:02 +02:00
parent fe04483e76
commit 51b6f89df2
10 changed files with 226 additions and 16 deletions

16
backend/src/env.rs Normal file
View File

@@ -0,0 +1,16 @@
#[derive(Debug, Clone)]
pub struct Env {
pub db_url: String,
pub token_secret: String,
}
impl Env {
pub fn load() -> Env {
let db_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");
let token_secret = std::env::var("TOKEN_SECRET").expect("TOKEN_SECRET must be set");
Env {
db_url,
token_secret,
}
}
}