You've already forked AstralRinth
forked from didirus/AstralRinth
Fix project visibility in hash routes (#792)
* Fix project visibility in hash routes * improve * clippy * CLIPPYYYYYYYYYYYYYY * clippy, I hope you know that I hate you --------- Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
@@ -75,6 +75,7 @@ pub async fn forge_updates(
|
||||
.collect(),
|
||||
&user_option,
|
||||
&pool,
|
||||
redis,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -234,6 +234,7 @@ pub async fn get_versions_from_hashes(
|
||||
database::models::Version::get_many(&version_ids, &**pool, &redis).await?,
|
||||
&user_option,
|
||||
&pool,
|
||||
redis,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ pub async fn versions_get(
|
||||
.map(|x| x.1)
|
||||
.ok();
|
||||
|
||||
let versions = filter_authorized_versions(versions_data, &user_option, &pool).await?;
|
||||
let versions = filter_authorized_versions(versions_data, &user_option, &pool, redis).await?;
|
||||
|
||||
Ok(HttpResponse::Ok().json(versions))
|
||||
}
|
||||
@@ -820,7 +820,7 @@ pub async fn version_list(
|
||||
response.sort();
|
||||
response.dedup_by(|a, b| a.inner.id == b.inner.id);
|
||||
|
||||
let response = filter_authorized_versions(response, &user_option, &pool).await?;
|
||||
let response = filter_authorized_versions(response, &user_option, &pool, redis).await?;
|
||||
|
||||
Ok(HttpResponse::Ok().json(response))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user