diff options
| author | mrw1593 <botahamec@outlook.com> | 2023-05-14 10:28:20 -0400 |
|---|---|---|
| committer | mrw1593 <botahamec@outlook.com> | 2023-05-29 10:45:59 -0400 |
| commit | ff389fe18b3eb9eef54c69f201d96e940eb82a23 (patch) | |
| tree | a274cc8e223dcf7e1d78182db28488dd5484e76b /src/api/users.rs | |
| parent | afe8b4e6e2f1e854d8a97d3f62a4b011eea59130 (diff) | |
Update documentation
Diffstat (limited to 'src/api/users.rs')
| -rw-r--r-- | src/api/users.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/users.rs b/src/api/users.rs index d62cc27..863d99e 100644 --- a/src/api/users.rs +++ b/src/api/users.rs @@ -10,14 +10,17 @@ use crate::models::User; use crate::services::crypto::PasswordHash; use crate::services::{db, id}; +/// Just a username. No password hash, because that'd be tempting fate. #[derive(Debug, Clone, Serialize)] struct UserResponse { + id: Uuid, username: Box<str>, } impl From<User> for UserResponse { fn from(user: User) -> Self { Self { + id: user.id, username: user.username, } } @@ -107,6 +110,7 @@ async fn get_username( Ok(response) } +/// A request to create or update user information #[derive(Debug, Clone, Deserialize)] struct UserRequest { username: Box<str>, |
