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
|
|
@ -38,6 +38,7 @@ pub enum DashboardEvent {
|
|||
from: String,
|
||||
to: String,
|
||||
body: String,
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
at: i64,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
in_reply_to: Option<i64>,
|
||||
|
|
@ -53,6 +54,7 @@ pub enum DashboardEvent {
|
|||
from: String,
|
||||
to: String,
|
||||
body: String,
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
at: i64,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
in_reply_to: Option<i64>,
|
||||
|
|
@ -95,6 +97,7 @@ pub enum DashboardEvent {
|
|||
sha_short: Option<String>,
|
||||
/// `"approved"` / `"denied"` / `"failed"`.
|
||||
status: &'static str,
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
resolved_at: i64,
|
||||
note: Option<String>,
|
||||
description: Option<String>,
|
||||
|
|
@ -111,7 +114,9 @@ pub enum DashboardEvent {
|
|||
question: String,
|
||||
options: Vec<String>,
|
||||
multi: bool,
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
asked_at: i64,
|
||||
#[serde(with = "hive_sh4re::wire_time::iso_opt")]
|
||||
deadline_at: Option<i64>,
|
||||
target: Option<String>,
|
||||
/// Verified file-path tokens that appear in `question`.
|
||||
|
|
@ -130,6 +135,7 @@ pub enum DashboardEvent {
|
|||
id: i64,
|
||||
answer: String,
|
||||
answerer: String,
|
||||
#[serde(with = "hive_sh4re::wire_time::iso")]
|
||||
answered_at: i64,
|
||||
cancelled: bool,
|
||||
target: Option<String>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue