Synchro nocturne et préchauffage de la grille branchés (/api/admin/sync, /api/admin/grid-warmup, minuteur)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG2LLJuswrrTTPKJmunEVf
This commit is contained in:
Claude committed 2026-10-12 19:57:50 +00:00
1 parent d52a942812
commit 1dce73afaa
2 files changed
+9 -2

No files matched your search

+8 -1
View File
@@ -1,10 +1,13 @@
//! Module `admin` — comptes, clés d'API, Paramètres, synchronisation nocturne.
pub mod api_keys;
pub mod grid_warmup;
pub mod logs;
mod qlik_bridge;
pub mod settings;
pub mod sync_fournisseurs;
pub mod sync_routes;
pub mod sync_scheduler;
pub mod sync_settings;
pub mod users;
@@ -19,6 +22,8 @@ use serde_json::{Map, Value};
pub fn router() -> Router {
Router::new()
.route("/api/logs", get(logs::get_logs))
.route("/api/admin/sync", get(sync_routes::get).patch(sync_routes::patch).post(sync_routes::post))
.route("/api/admin/grid-warmup", get(grid_warmup::get).post(grid_warmup::post))
.route("/api/admin/sync/fournisseurs", get(sync_fournisseurs::get).patch(sync_fournisseurs::patch))
}
@@ -62,4 +67,6 @@ pub fn pages() -> Vec<(&'static str, Handler)> {
}
/// Tâches de fond lancées au démarrage (minuteur de la synchro nocturne).
pub fn start_background_tasks() {}
pub fn start_background_tasks() {
sync_scheduler::start_sync_timer();
}
+1 -1
View File
@@ -6,7 +6,7 @@ pub mod fallback;
pub mod password;
pub mod session;
pub use api_key::{ApiAuth, AuthContext};
pub use api_key::ApiAuth;
pub use authz::{require_admin, require_session, AdminUser, SessionUser, UtilisateurCourant};
pub use session::{Claims, Token};