More nit picking.
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user