From 921f38a73e5d58a5a6077477a8b52d2705798f55 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 17 Sep 2024 19:06:20 -0400 Subject: Express record dependencies through types. This provides a convenient place to _stick_ "not found" errors, though actually introducing them will come in a later commit. --- src/repo/token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/repo/token.rs') diff --git a/src/repo/token.rs b/src/repo/token.rs index e7eb273..01a982e 100644 --- a/src/repo/token.rs +++ b/src/repo/token.rs @@ -22,7 +22,7 @@ impl<'c> Tokens<'c> { /// be used to control expiry, until the token is actually used. pub async fn issue( &mut self, - login: &login::Id, + login: &Login, issued_at: DateTime, ) -> Result { let secret = Uuid::new_v4().to_string(); @@ -35,7 +35,7 @@ impl<'c> Tokens<'c> { returning secret as "secret!" "#, secret, - login, + login.id, issued_at, ) .fetch_one(&mut *self.0) -- cgit v1.2.3