mirror of
https://github.com/beerpiss/saekawa.git
synced 2025-02-17 10:48:32 +01:00
fix: actually allow classEmblemBase and classEmblemMedal to not exist
This commit is contained in:
parent
cd7a966d7d
commit
ccb747cd33
@ -23,10 +23,16 @@ pub struct UpsertUserAllBody {
|
||||
pub struct UserData {
|
||||
pub access_code: String,
|
||||
|
||||
#[serde(deserialize_with = "deserialize_option_number_from_string")]
|
||||
#[serde(
|
||||
default = "default_class_emblem",
|
||||
deserialize_with = "deserialize_option_number_from_string",
|
||||
)]
|
||||
pub class_emblem_base: Option<u32>,
|
||||
|
||||
#[serde(deserialize_with = "deserialize_option_number_from_string")]
|
||||
#[serde(
|
||||
default = "default_class_emblem",
|
||||
deserialize_with = "deserialize_option_number_from_string"
|
||||
)]
|
||||
pub class_emblem_medal: Option<u32>,
|
||||
}
|
||||
|
||||
@ -91,3 +97,7 @@ pub struct UserPlaylog {
|
||||
fn default_judge_heaven() -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
fn default_class_emblem() -> Option<u32> {
|
||||
None
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user