hive-c0re: rfc3339 timestamps on dashboard api + sse json
This commit is contained in:
parent
cf3ac49729
commit
bac2c0a65e
6 changed files with 23 additions and 8 deletions
|
|
@ -432,7 +432,8 @@ struct ApprovalHistoryView {
|
|||
sha_short: Option<String>,
|
||||
/// `approved` / `denied` / `failed`.
|
||||
status: &'static str,
|
||||
/// Unix seconds. Renders as a relative time on the dashboard.
|
||||
/// RFC 3339 UTC. Renders as a relative time on the dashboard.
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
resolved_at: i64,
|
||||
/// Operator-supplied deny reason (for `denied`) or build error
|
||||
/// (for `failed`). None on `approved`.
|
||||
|
|
@ -471,8 +472,10 @@ struct ApprovalView {
|
|||
/// `None` for every other kind.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
commit_ref: Option<String>,
|
||||
/// Unix seconds the approval was queued. Rendered as a relative
|
||||
/// time on the card so the operator can spot a stale request.
|
||||
/// RFC 3339 UTC time the approval was queued. Rendered as a
|
||||
/// relative time on the card so the operator can spot a stale
|
||||
/// request.
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
requested_at: i64,
|
||||
}
|
||||
|
||||
|
|
@ -1373,7 +1376,7 @@ async fn api_operator_inbox(State(state): State<AppState>) -> Response {
|
|||
"id": id,
|
||||
"from": from,
|
||||
"body": body,
|
||||
"at": at,
|
||||
"at": hive_sh4re::wire_time::to_iso(at),
|
||||
"in_reply_to": in_reply_to,
|
||||
"file_refs": file_refs,
|
||||
}))
|
||||
|
|
|
|||
Loading…
Reference in a new issue