summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-05-13 13:53:34 -0400
committermrw1593 <botahamec@outlook.com>2023-05-29 10:45:57 -0400
commit65a541fd0b32adc68f3bbbab14145ebf563b7ae1 (patch)
tree6b73e41bdca24eb85b05dd1c0b5684a225c93dd5 /src/models
parentfdbc7ed756ce455c956dd7a5885db6b6eabfd578 (diff)
Change user_id to id
Diffstat (limited to 'src/models')
-rw-r--r--src/models/user.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/models/user.rs b/src/models/user.rs
index 4649890..8555ee2 100644
--- a/src/models/user.rs
+++ b/src/models/user.rs
@@ -7,14 +7,14 @@ use crate::services::crypto::PasswordHash;
#[derive(Debug, Clone)]
pub struct User {
- pub user_id: Uuid,
+ pub id: Uuid,
pub username: Box<str>,
pub password: PasswordHash,
}
impl PartialEq for User {
fn eq(&self, other: &Self) -> bool {
- self.user_id == other.user_id
+ self.id == other.id
}
}
@@ -22,7 +22,7 @@ impl Eq for User {}
impl Hash for User {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- state.write_u128(self.user_id.as_u128())
+ state.write_u128(self.id.as_u128())
}
}