diff options
Diffstat (limited to 'makima/src/server/state.rs')
| -rw-r--r-- | makima/src/server/state.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/makima/src/server/state.rs b/makima/src/server/state.rs index d022834..86f38c8 100644 --- a/makima/src/server/state.rs +++ b/makima/src/server/state.rs @@ -128,6 +128,9 @@ pub struct SupervisorQuestionNotification { pub pending: bool, /// When the question was asked pub created_at: chrono::DateTime<chrono::Utc>, + /// Whether multiple choices can be selected + #[serde(default)] + pub multi_select: bool, } /// Stored supervisor question for persistence @@ -141,6 +144,8 @@ pub struct PendingSupervisorQuestion { pub choices: Vec<String>, pub context: Option<String>, pub created_at: chrono::DateTime<chrono::Utc>, + /// Whether multiple choices can be selected + pub multi_select: bool, } /// Response to a supervisor question @@ -654,6 +659,7 @@ impl AppState { question: String, choices: Vec<String>, context: Option<String>, + multi_select: bool, ) -> Uuid { let question_id = Uuid::new_v4(); let now = chrono::Utc::now(); @@ -670,6 +676,7 @@ impl AppState { choices: choices.clone(), context: context.clone(), created_at: now, + multi_select, }, ); @@ -684,6 +691,7 @@ impl AppState { context, pending: true, created_at: now, + multi_select, }); tracing::info!( @@ -742,6 +750,7 @@ impl AppState { context: question.1.context, pending: false, created_at: question.1.created_at, + multi_select: question.1.multi_select, }); tracing::info!( |
