Improve session privacy handling and cleanup logic
Rust / build (push) Canceled after 0s

This commit is contained in:
thakares committed 2026-05-23 15:57:34 +05:30
1 parent 0b43530651
commit 217dc5f92b
4 files changed
+15 -26

No files matched your search

+1 -7
View File
@@ -8,13 +8,7 @@ pub async fn handler(
State(state): State<Arc<AppState>>,
Json(payload): Json<InitRequest>,
) -> Result<Json<InitResponse>, SessionError> {
let config = {
if let Ok(cfg) = state.config.read() {
cfg.clone()
} else {
crate::config::Config::default()
}
};
let config = state.get_config();
let conn = state.db_pool.get()?;
let resp = crate::session::create_session(&conn, &config, &payload.public_key)?;
Ok(Json(resp))