diff options
| author | rtkay123 <dev@kanjala.com> | 2026-02-22 15:18:34 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2026-02-22 15:18:34 +0200 |
| commit | 3d4b23c53f203249b1d0c8e51d668f7b86dbaa6c (patch) | |
| tree | e3ec9dbe9216e0633338c1ba8960721d10b8bc69 /lib | |
| parent | 3fef60a3daf7d17dff22d815400e03f36e4128c9 (diff) | |
| download | sellershut-3d4b23c53f203249b1d0c8e51d668f7b86dbaa6c.tar.bz2 sellershut-3d4b23c53f203249b1d0c8e51d668f7b86dbaa6c.zip | |
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/auth-service/src/client/mod.rs | 2 | ||||
| -rw-r--r-- | lib/auth-service/src/service/mod.rs | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/auth-service/src/client/mod.rs b/lib/auth-service/src/client/mod.rs index e02672b..774a863 100644 --- a/lib/auth-service/src/client/mod.rs +++ b/lib/auth-service/src/client/mod.rs @@ -30,7 +30,7 @@ impl Deref for OauthClient { } } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ClientConfig { client_id: String, client_secret: SecretString, diff --git a/lib/auth-service/src/service/mod.rs b/lib/auth-service/src/service/mod.rs index 31c9019..b699c51 100644 --- a/lib/auth-service/src/service/mod.rs +++ b/lib/auth-service/src/service/mod.rs @@ -30,7 +30,14 @@ pub struct AuthService { impl AccountMgr for AuthService { #[instrument(skip(self))] async fn get_apid_by_email(&self, email: &str) -> Result<Option<String>> { - todo!() + let result = sqlx::query_scalar!( + "select user_id from account where email = $1 limit 1", + email + ) + .fetch_optional(&self.database) + .await?; + debug!(user = ?result, "find my email"); + Ok(result) } #[instrument(skip(transaction))] |
