fix: regenerate SQLx cache and fix type annotation errors in offline mode
This commit is contained in:
parent
466b972e9f
commit
58eff5ce63
2 changed files with 4 additions and 4 deletions
|
|
@ -120,7 +120,7 @@ impl OnboardingStateRepository {
|
|||
user_id: Uuid,
|
||||
role_id: Uuid,
|
||||
) -> Result<bool, sqlx::Error> {
|
||||
let row = sqlx::query!(
|
||||
let status = sqlx::query_scalar!(
|
||||
r#"
|
||||
SELECT status FROM onboarding_states
|
||||
WHERE user_id = $1 AND role_id = $2
|
||||
|
|
@ -130,6 +130,6 @@ impl OnboardingStateRepository {
|
|||
)
|
||||
.fetch_optional(pool)
|
||||
.await?;
|
||||
Ok(row.map(|r| r.status == "COMPLETED").unwrap_or(false))
|
||||
Ok(status.map(|s| s == "COMPLETED").unwrap_or(false))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ impl UserRepository {
|
|||
|
||||
/// Returns all approved role keys for a user (e.g. ["COMPANY", "JOB_SEEKER"])
|
||||
pub async fn get_user_role_keys(pool: &PgPool, user_id: Uuid) -> Result<Vec<String>, sqlx::Error> {
|
||||
let rows = sqlx::query!(
|
||||
let rows = sqlx::query_scalar!(
|
||||
r#"
|
||||
SELECT r.key
|
||||
FROM user_roles ur
|
||||
|
|
@ -123,7 +123,7 @@ impl UserRepository {
|
|||
.fetch_all(pool)
|
||||
.await?;
|
||||
|
||||
Ok(rows.into_iter().map(|r| r.key).collect())
|
||||
Ok(rows)
|
||||
}
|
||||
|
||||
pub async fn set_email_verification_token(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue