INNER CODE UNIT · Rust
Ok
rkudryashov/graphql-rust-demo · auth-service/src/lib.rs:59
if let Ok(hash) = std::env::var("SECURED_USER_PASSWORD_HASH") {
repository::update_password_hash(hash, conn).expect("Failed to update password hash");
};
}
pub fn get_conn_from_ctx(ctx: &Context<'_>) -> PooledConnection<ConnectionManager<PgConnection>> {
ctx.data::<PgPool>()
.expect("Can't get pool")
.get()
.expect("Can't get DB connection")
}