remove impl LoginSchema, add InstancePolicies

This commit is contained in:
bitfl0wer 2023-04-16 22:18:51 +02:00
parent 4c9ddc4569
commit fde38bc358
1 changed files with 13 additions and 20 deletions

View File

@ -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