forked from didirus/AstralRinth
Fix unlisted showing (#873)
* Fix projects showing draft * fix build * run fmt
This commit is contained in:
@@ -92,7 +92,7 @@ pub async fn maven_metadata(
|
||||
.map(|x| x.1)
|
||||
.ok();
|
||||
|
||||
if !is_visible_project(&project.inner, &user_option, &pool).await? {
|
||||
if !is_visible_project(&project.inner, &user_option, &pool, false).await? {
|
||||
return Err(ApiError::NotFound);
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ pub async fn version_file(
|
||||
.map(|x| x.1)
|
||||
.ok();
|
||||
|
||||
if !is_visible_project(&project.inner, &user_option, &pool).await? {
|
||||
if !is_visible_project(&project.inner, &user_option, &pool, false).await? {
|
||||
return Err(ApiError::NotFound);
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ pub async fn version_file_sha1(
|
||||
.map(|x| x.1)
|
||||
.ok();
|
||||
|
||||
if !is_visible_project(&project.inner, &user_option, &pool).await? {
|
||||
if !is_visible_project(&project.inner, &user_option, &pool, false).await? {
|
||||
return Err(ApiError::NotFound);
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ pub async fn version_file_sha512(
|
||||
.map(|x| x.1)
|
||||
.ok();
|
||||
|
||||
if !is_visible_project(&project.inner, &user_option, &pool).await? {
|
||||
if !is_visible_project(&project.inner, &user_option, &pool, false).await? {
|
||||
return Err(ApiError::NotFound);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user