You've already forked AstralRinth
forked from didirus/AstralRinth
This reverts commit 609e3896eb.
This commit is contained in:
@@ -4,7 +4,6 @@ use crate::database::models::version_item::VersionQueryResult;
|
||||
use crate::database::models::{DBCollection, DBOrganization, DBTeamMember};
|
||||
use crate::database::redis::RedisPool;
|
||||
use crate::database::{DBProject, DBVersion, models};
|
||||
use crate::file_hosting::CdnChoice;
|
||||
use crate::models::users::User;
|
||||
use crate::routes::ApiError;
|
||||
use futures::TryStreamExt;
|
||||
@@ -196,7 +195,6 @@ pub async fn filter_visible_versions(
|
||||
user_option: &Option<User>,
|
||||
pool: &PgPool,
|
||||
redis: &RedisPool,
|
||||
cdn_choice: &CdnChoice,
|
||||
) -> Result<Vec<crate::models::projects::Version>, ApiError> {
|
||||
let filtered_version_ids = filter_visible_version_ids(
|
||||
versions.iter().map(|x| &x.inner).collect_vec(),
|
||||
@@ -206,10 +204,7 @@ pub async fn filter_visible_versions(
|
||||
)
|
||||
.await?;
|
||||
versions.retain(|x| filtered_version_ids.contains(&x.inner.id));
|
||||
Ok(versions
|
||||
.into_iter()
|
||||
.map(|v| crate::models::projects::Version::from(v, cdn_choice))
|
||||
.collect())
|
||||
Ok(versions.into_iter().map(|x| x.into()).collect())
|
||||
}
|
||||
|
||||
impl ValidateAuthorized for models::DBOAuthClient {
|
||||
|
||||
Reference in New Issue
Block a user