Maven fix (#337)

This commit is contained in:
stairman06 2022-04-24 12:55:56 -05:00 committed by GitHub
parent 80e00a80d5
commit 33d2a77e37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ use crate::models::projects::ProjectId;
use crate::routes::ApiError;
use crate::util::auth::get_user_from_headers;
use crate::{database, util::auth::is_authorized};
use actix_web::{get, web, HttpRequest, HttpResponse};
use actix_web::{get, route, web, HttpRequest, HttpResponse};
use sqlx::PgPool;
use yaserde_derive::YaSerialize;
@ -148,7 +148,11 @@ fn find_file<'a>(
}
}
#[get("maven/modrinth/{id}/{versionnum}/{file}")]
#[route(
"maven/modrinth/{id}/{versionnum}/{file}",
method = "GET",
method = "HEAD"
)]
pub async fn version_file(
req: HttpRequest,
params: web::Path<(String, String, String)>,