From 2420f1e75d54a5f209b0267715f078a369d81eb1 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Sun, 23 Mar 2025 15:58:33 -0400 Subject: Rename the `login` module to `user`. --- src/token/repo/token.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/token/repo/token.rs') diff --git a/src/token/repo/token.rs b/src/token/repo/token.rs index 3428030..145ba2d 100644 --- a/src/token/repo/token.rs +++ b/src/token/repo/token.rs @@ -5,9 +5,9 @@ use crate::{ clock::DateTime, db::NotFound, event::{Instant, Sequence}, - login::{self, History, Login}, name::{self, Name}, token::{Id, Secret}, + user::{self, History, User}, }; pub trait Provider { @@ -85,7 +85,7 @@ impl Tokens<'_> { } // Revoke tokens for a login - pub async fn revoke_all(&mut self, login: &login::History) -> Result, sqlx::Error> { + pub async fn revoke_all(&mut self, login: &user::History) -> Result, sqlx::Error> { let login = login.id(); let tokens = sqlx::query_scalar!( r#" @@ -139,7 +139,7 @@ impl Tokens<'_> { where secret = $2 returning id as "token: Id", - user as "user: login::Id" + user as "user: user::Id" "#, used_at, secret, @@ -151,7 +151,7 @@ impl Tokens<'_> { let login = sqlx::query!( r#" select - id as "id: login::Id", + id as "id: user::Id", display_name as "display_name: String", canonical_name as "canonical_name: String", created_sequence as "created_sequence: Sequence", @@ -163,7 +163,7 @@ impl Tokens<'_> { ) .map(|row| { Ok::<_, name::Error>(History { - login: Login { + user: User { id: row.id, name: Name::new(row.display_name, row.canonical_name)?, }, -- cgit v1.2.3