registration
This commit is contained in:
20
web/src/pages/register/state.rs
Normal file
20
web/src/pages/register/state.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
/// The register form, one field per `RegisterRequest` field. Every one of them
|
||||
/// is optional at this layer: the client does not validate either, it trims and
|
||||
/// posts, and the backend answers with what is wrong.
|
||||
#[derive(serde::Deserialize)]
|
||||
pub(crate) struct RegisterInput {
|
||||
#[serde(default)]
|
||||
pub username: String,
|
||||
#[serde(default)]
|
||||
pub email: String,
|
||||
#[serde(default)]
|
||||
pub password: String,
|
||||
#[serde(default)]
|
||||
pub password_confirmation: String,
|
||||
#[serde(default)]
|
||||
pub role: String,
|
||||
#[serde(default)]
|
||||
pub timezone: String,
|
||||
#[serde(default)]
|
||||
pub phone_country: String,
|
||||
}
|
||||
Reference in New Issue
Block a user