push notifications
All checks were successful
/ upload (release) Successful in 1m4s

This commit is contained in:
pavel 2026-02-12 01:28:24 +01:00
commit 91db5861c8
21 changed files with 1263 additions and 79 deletions

View file

@ -14,6 +14,8 @@ pub struct Config {
pub cookie_secure: bool,
pub agent_max_turns: u32,
pub agent_max_duration_secs: u64,
pub vapid_private_key: String,
pub vapid_public_key: String,
}
impl Config {
@ -54,6 +56,11 @@ impl Config {
.and_then(|s| s.parse().ok())
.unwrap_or(120);
let vapid_private_key = env::var("VAPID_PRIVATE_KEY")
.map_err(|_| AppError::Config("VAPID_PRIVATE_KEY must be set".into()))?;
let vapid_public_key = env::var("VAPID_PUBLIC_KEY")
.map_err(|_| AppError::Config("VAPID_PUBLIC_KEY must be set".into()))?;
Ok(Config {
database_url,
port,
@ -66,6 +73,8 @@ impl Config {
cookie_secure,
agent_max_turns,
agent_max_duration_secs,
vapid_private_key,
vapid_public_key,
})
}
}