added serde for serializing in the webserver

This commit is contained in:
2025-08-15 16:46:44 +02:00
parent fabb14de86
commit 21480cef4f
5 changed files with 11 additions and 10 deletions

View File

@@ -1,14 +1,15 @@
extern crate alloc;
use super::TallyID;
use alloc::collections::BTreeMap;
use alloc::string::String;
use serde::Serialize;
#[derive(Clone, Serialize)]
pub struct Name {
pub first: String,
pub last: String,
}
#[derive(Clone, Serialize)]
pub struct IDMapping {
id_map: BTreeMap<TallyID, Name>,
}
@@ -28,4 +29,3 @@ impl IDMapping {
self.id_map.insert(id, name);
}
}