Skip to content

Commit

Permalink
controllers/version/downloads: Remove unused get_version_id() fn (r…
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 authored Mar 29, 2024
1 parent 28b4ee3 commit 93191f6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/controllers/version/downloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ pub async fn download(
}
}

#[instrument("db.query", skip(conn), fields(message = "SELECT ... FROM versions"))]
fn get_version_id(krate: &str, version: &str, conn: &mut PgConnection) -> QueryResult<i32> {
versions::table
.inner_join(crates::table)
.select(versions::id)
.filter(crates::name.eq(&krate))
.filter(versions::num.eq(&version))
.first::<i32>(conn)
}

/// Handles the `GET /crates/:crate_id/:version/downloads` route.
pub async fn downloads(
app: AppState,
Expand Down

0 comments on commit 93191f6

Please sign in to comment.