1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ─── handlers.rs ──────────────────────────────────────────────────────────────
// This file contains the business logic for each database operation exposed
// via the HTTP API. Each `process_*` function:
// 1. Validates the incoming JSON payload.
// 2. Reads parameters from the payload.
// 3. Calls the appropriate Db method(s).
// 4. Returns a JSON response value.
//
// These functions are called by the thin Axum handler wrappers in main.rs,
// and also by the WebSocket handler for WS-based operations.
//
// The separation between main.rs (HTTP wiring) and handlers.rs (logic) means
// the same logic can be reused from both HTTP and WebSocket contexts.
// ─────────────────────────────────────────────────────────────────────────────
// process_analytics uses server-only deps so it stays native-only.
// The other four modules are pure logic and compile for WASM too.
pub use process_get;
pub use process_set;
pub use process_update;
pub use process_delete;
pub use process_snapshot;
pub use process_schema;
pub use process_analytics;