diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-03-24 23:33:36 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-03-24 23:33:36 -0400 |
| commit | 45eea07a56022f647b3a273798a5255cda73f13d (patch) | |
| tree | 0606cd011204ca263c550585f743903f0e0c8a1c /src/token/repo/auth.rs | |
| parent | c3d774545cefd6168cfdc69c128a84bf9dee4776 (diff) | |
Rename a bunch of straggler references to `login`.
Diffstat (limited to 'src/token/repo/auth.rs')
| -rw-r--r-- | src/token/repo/auth.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/token/repo/auth.rs b/src/token/repo/auth.rs index a1f4aad..68a81c7 100644 --- a/src/token/repo/auth.rs +++ b/src/token/repo/auth.rs @@ -51,7 +51,7 @@ impl Auth<'_> { Ok((login, row.password_hash)) } - pub async fn for_login(&mut self, login: &User) -> Result<(History, StoredHash), LoadError> { + pub async fn for_user(&mut self, user: &User) -> Result<(History, StoredHash), LoadError> { let row = sqlx::query!( r#" select @@ -64,12 +64,12 @@ impl Auth<'_> { from user where id = $1 "#, - login.id, + user.id, ) .fetch_one(&mut *self.0) .await?; - let login = History { + let user = History { user: User { id: row.id, name: Name::new(row.display_name, row.canonical_name)?, @@ -77,7 +77,7 @@ impl Auth<'_> { created: Instant::new(row.created_at, row.created_sequence), }; - Ok((login, row.password_hash)) + Ok((user, row.password_hash)) } } |
