Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

Commit

Permalink
Allow empty config files data
Browse files Browse the repository at this point in the history
  • Loading branch information
LJ authored and LJ committed Dec 28, 2024
1 parent 89130a0 commit 5b0c54a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/model/user_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,16 @@ impl std::fmt::Debug for ConfigFileData {
}
}

#[serde_with::serde_as]
#[derive(Debug, PartialEq, Eq, Hash, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
/// Result from the API when requesting an user session
pub struct UserSessionResult {
#[serde(rename = "entity")]
/// The user session, called `'entity'` in the API
pub user_session: UserSession,
#[serde_as(deserialize_as = "serde_with::DefaultOnNull")]
#[serde(default)]
/// The config files for the user session
pub config_files: Vec<ConfigFileData>,
}
Expand Down

0 comments on commit 5b0c54a

Please sign in to comment.