More nit picking.

This commit is contained in:
2026-10-12 12:43:21 +02:00
parent c89b76043b
commit 0b0c72b337
29 changed files with 139 additions and 118 deletions
+10 -4
View File
@@ -25,7 +25,9 @@ pub async fn issue<'e, E>(executor: E, token: Token) -> Result<(), RepositoryErr
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{
Ok(db::issue(executor, encode(token)).await?)
db::issue(executor, encode(token)).await?;
Ok(())
}
pub async fn rotate_refresh_token<'e, E>(
@@ -39,7 +41,7 @@ pub async fn rotate_refresh_token<'e, E>(
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{
Ok(db::rotate_refresh_token(
let rotated = db::rotate_refresh_token(
executor,
old_refresh_hash,
access_token_hash,
@@ -47,14 +49,18 @@ where
access_expires_at,
refresh_expires_at,
)
.await?)
.await?;
Ok(rotated)
}
pub async fn revoke<'e, E>(executor: E, token_hash: &[u8]) -> Result<(), RepositoryError>
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{
Ok(db::revoke(executor, token_hash).await?)
db::revoke(executor, token_hash).await?;
Ok(())
}
fn decode(token: TokenRow) -> Result<Token, RepositoryError> {
+2 -2
View File
@@ -100,9 +100,9 @@ pub async fn verify<'e, E>(
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{
let result = db::verify(executor, app_id, secret_hash).await?;
let is_valid = db::verify(executor, app_id, secret_hash).await?;
Ok(result)
Ok(is_valid)
}
pub async fn delete_by_id<'e, E>(