Skip to content

Commit 04b4c5a

Browse files
committed
Fix compile error
1 parent 2fe19c8 commit 04b4c5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/routes/download.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub async fn handle_version_download(
2626
let url =
2727
make_cdn_url(&cdn, &format!("data/{hash}/versions/{version}/{file}"))?;
2828

29-
if let Err(error) = count_download(&req, &ctx, &url).await {
29+
if let Err(error) = count_download(&req, &ctx).await {
3030
console_error!(
3131
"Error encountered while trying to count download: {error}",
3232
);
@@ -55,7 +55,6 @@ pub fn handle_download(
5555
async fn count_download(
5656
req: &Request,
5757
ctx: &RouteContext<()>,
58-
forward_url: &Url,
5958
) -> Result<()> {
6059
if let Some(ip) = req.headers().get(CF_IP_HEADER)? {
6160
let (project, file) = (get_param(ctx, "hash"), get_param(ctx, "file"));
@@ -138,14 +137,15 @@ async fn count_download(
138137
let labrinth_secret = ctx.secret(LABRINTH_SECRET)?.to_string();
139138
let hash = get_param(ctx, "hash").to_owned();
140139
let version_name = get_param(ctx, "version").to_owned();
140+
let og_url = req.url()?.to_string();
141141

142142
wasm_bindgen_futures::spawn_local(async move {
143143
match request_download_count(
144144
&labrinth_url,
145145
&labrinth_secret,
146146
&hash,
147147
&version_name,
148-
req.url()?.to_string(),
148+
og_url,
149149
)
150150
.await
151151
{

0 commit comments

Comments
 (0)