better date parsing

This commit is contained in:
2025-11-11 01:36:17 +01:00
parent 8788cd3e25
commit 4ce4bd1a4b
14 changed files with 2413 additions and 0 deletions
+8
View File
@@ -11,6 +11,7 @@ use crate::{
config::AppConfig,
db::PgPool,
error::{AppError, AppResult},
issued_at::IssuedAtSettings,
storage::{ObjectStorage, TenantStorage},
tenants::{apply_tenant_guc, clear_tenant_context, clear_user_guc, TenantService},
};
@@ -25,6 +26,7 @@ pub struct AppState {
pub jwt: JwtService,
pub tenants: TenantService,
pub passkeys: Option<PasskeyService>,
issued_at: Arc<IssuedAtSettings>,
}
impl AppState {
@@ -47,6 +49,7 @@ impl AppState {
storage: Arc<dyn ObjectStorage>,
jwt: JwtService,
) -> Self {
let issued_at = Arc::new(IssuedAtSettings::from_config(&config));
let config = Arc::new(config);
let tenants = TenantService::new(pool.clone());
@@ -65,6 +68,7 @@ impl AppState {
jwt,
tenants,
passkeys,
issued_at,
}
}
@@ -96,4 +100,8 @@ impl AppState {
AppError::internal("tenant storage error")
})
}
pub fn issued_at_settings(&self) -> Arc<IssuedAtSettings> {
self.issued_at.clone()
}
}