()
| 3615 | Lazy::new(|| RwLock::new(HashMap::new())); |
| 3616 | |
| 3617 | async fn list_questions() -> Json<Vec<QuestionInfo>> { |
| 3618 | let pending = QUESTION_REQUESTS.read().await; |
| 3619 | let mut result: Vec<_> = pending.values().cloned().collect(); |
| 3620 | result.sort_by(|a, b| a.id.cmp(&b.id)); |
| 3621 | Json(result) |
| 3622 | } |
| 3623 | |
| 3624 | #[derive(Debug, Deserialize)] |
| 3625 | pub struct ReplyQuestionRequest { |