hive-c0re: rfc3339 timestamps on dashboard api + sse json

This commit is contained in:
damocles 2026-07-02 21:30:16 +02:00 committed by mara
commit bac2c0a65e
6 changed files with 23 additions and 8 deletions

View file

@ -74,11 +74,14 @@ pub struct OpQuestion {
pub question: String,
pub options: Vec<String>,
pub multi: bool,
#[serde(with = "hive_sh4re::wire_time::iso")]
pub asked_at: i64,
/// Absolute unix-seconds deadline after which a watchdog auto-
/// resolves the question with answer `[expired]`. `None` = no
/// expiry. Surfaced on the dashboard as a remaining-time chip.
/// Deadline after which a watchdog auto-resolves the question with
/// answer `[expired]`. `None` = no expiry. Surfaced on the
/// dashboard as a remaining-time chip.
#[serde(with = "hive_sh4re::wire_time::iso_opt")]
pub deadline_at: Option<i64>,
#[serde(with = "hive_sh4re::wire_time::iso_opt")]
pub answered_at: Option<i64>,
pub answer: Option<String>,
/// Recipient of the question. `None` = the operator (dashboard