Add a method to create a user

This commit is contained in:
Valentin Tolmer
2021-05-26 08:43:31 +02:00
parent d1a42b178a
commit 5a70f2ebc2
6 changed files with 127 additions and 44 deletions

View File

@@ -46,6 +46,17 @@ impl Default for User {
}
}
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone, Default)]
pub struct CreateUserRequest {
// Same fields as User, but no creation_date, and with password.
pub user_id: String,
pub email: String,
pub display_name: Option<String>,
pub first_name: Option<String>,
pub last_name: Option<String>,
pub password: String,
}
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize)]
pub struct Group {
pub display_name: String,