remove impl LoginSchema, add InstancePolicies
This commit is contained in:
parent
4c9ddc4569
commit
fde38bc358
|
@ -114,26 +114,6 @@ pub mod schemas {
|
||||||
gift_code_sku_id: Option<String>,
|
gift_code_sku_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LoginSchema {
|
|
||||||
pub fn new(
|
|
||||||
login: String,
|
|
||||||
password: String,
|
|
||||||
undelete: Option<bool>,
|
|
||||||
captcha_key: Option<String>,
|
|
||||||
login_source: Option<String>,
|
|
||||||
gift_code_sku_id: Option<String>,
|
|
||||||
) -> LoginSchema {
|
|
||||||
LoginSchema {
|
|
||||||
login,
|
|
||||||
password,
|
|
||||||
undelete,
|
|
||||||
captcha_key,
|
|
||||||
login_source,
|
|
||||||
gift_code_sku_id,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub struct TotpSchema {
|
pub struct TotpSchema {
|
||||||
|
@ -142,6 +122,19 @@ pub mod schemas {
|
||||||
gift_code_sku_id: Option<String>,
|
gift_code_sku_id: Option<String>,
|
||||||
login_source: Option<String>,
|
login_source: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct InstancePoliciesSchema {
|
||||||
|
instance_name: String,
|
||||||
|
instance_description: Option<String>,
|
||||||
|
front_page: Option<String>,
|
||||||
|
tos_page: Option<String>,
|
||||||
|
correspondence_email: Option<String>,
|
||||||
|
correspondence_user_ID: Option<String>,
|
||||||
|
image: Option<String>,
|
||||||
|
instance_ID: Option<String>,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// I know that some of these tests are... really really basic and unneccessary, but sometimes, I
|
// I know that some of these tests are... really really basic and unneccessary, but sometimes, I
|
||||||
|
|
Loading…
Reference in New Issue