Skip to content

Commit

Permalink
chore(registry): bump clerk-rs, clippy lint (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrmiguel authored Oct 10, 2023
1 parent ed8e5af commit fabd050
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions registry/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env_logger = "0.10.0"
reqwest = "0.11.14"
aws-config = "0.55.0"
aws-sdk-s3 = "0.25.0"
clerk-rs = "0.1.7"
clerk-rs = "0.1.8"
rand = "0.8.5"
sha2 = "0.10.6"
tracing = "0.1.37"
Expand Down
6 changes: 3 additions & 3 deletions registry/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ pub async fn get_category_ids(
) -> Result<Vec<i64>, ExtensionRegistryError> {
let mut ids: Vec<i64> = Vec::new();
for slug in categories {
let id = sqlx::query!("SELECT id FROM categories WHERE slug = $1", slug)
let maybe_entry = sqlx::query!("SELECT id FROM categories WHERE slug = $1", slug)
.fetch_optional(conn.as_ref())
.await?;
if id.is_some() {
ids.push(id.unwrap().id)
if let Some(entry) = maybe_entry {
ids.push(entry.id)
}
}
Ok(ids)
Expand Down
4 changes: 2 additions & 2 deletions registry/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ pub fn routes_config(configuration: &mut web::ServiceConfig) {
.service(routes::download::download)
.service(
web::scope("/token")
.wrap(ClerkMiddleware::new(clerk_cfg.clone(), None))
.wrap(ClerkMiddleware::new(clerk_cfg.clone(), None, false))
.service(new_token),
)
.service(
web::scope("/admin")
.wrap(ClerkMiddleware::new(clerk_cfg, None))
.wrap(ClerkMiddleware::new(clerk_cfg, None, false))
.service(routes::root::auth_ok)
.service(routes::extensions::delete_extension)
.service(routes::extensions::put_shared_preload_libraries),
Expand Down

0 comments on commit fabd050

Please sign in to comment.