Add saved skin and cape profiles wardrobe feature
This commit is contained in:
1 parent
c7aa563dac
commit
ebd9de1bee
5 files changed
+375
-2
No files matched your search
@@ -217,6 +217,30 @@ pub struct PlayerProfile {
|
||||
pub available_capes: Vec<CapeInfo>,
|
||||
}
|
||||
|
||||
/// A saved skin and cape preset (wardrobe look).
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct SkinProfile {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub skin_data: Option<String>,
|
||||
#[serde(default = "default_skin_model")]
|
||||
pub skin_model: String,
|
||||
#[serde(default)]
|
||||
pub cape_id: Option<i64>,
|
||||
#[serde(default)]
|
||||
pub cape_name: Option<String>,
|
||||
#[serde(default)]
|
||||
pub cape_url: Option<String>,
|
||||
#[serde(default)]
|
||||
pub account_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub created_at: String,
|
||||
}
|
||||
|
||||
fn default_skin_model() -> String {
|
||||
"classic".into()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct LoginRequest {
|
||||
pub username: String,
|
||||
|
||||
Reference in new issue
Block a user