summaryrefslogtreecommitdiff
path: root/src/token/repo/token.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/token/repo/token.rs')
-rw-r--r--src/token/repo/token.rs10
1 files changed, 5 insertions, 5 deletions
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<Vec<Id>, sqlx::Error> {
+ pub async fn revoke_all(&mut self, login: &user::History) -> Result<Vec<Id>, 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)?,
},