commit
1445d6ea8c
@ -516,8 +516,15 @@ impl Mod {
|
||||
where
|
||||
E: sqlx::Executor<'a, Database = sqlx::Postgres> + Copy,
|
||||
{
|
||||
// TODO: this could be optimized
|
||||
futures::future::try_join_all(mod_ids.into_iter().map(|id| Self::get_full(id, exec))).await
|
||||
let mut mods = Vec::new();
|
||||
|
||||
for mod_id in mod_ids {
|
||||
mods.push(Self::get_full(mod_id, exec).await?)
|
||||
}
|
||||
|
||||
Ok(mods)
|
||||
/*// TODO: this could be optimized
|
||||
futures::future::try_join_all(mod_ids.into_iter().map(|id| Self::get_full(id, exec))).await*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -568,9 +568,15 @@ impl Version {
|
||||
where
|
||||
E: sqlx::Executor<'a, Database = sqlx::Postgres> + Copy,
|
||||
{
|
||||
// TODO: this could be optimized
|
||||
futures::future::try_join_all(version_ids.into_iter().map(|id| Self::get_full(id, exec)))
|
||||
.await
|
||||
let mut versions = Vec::new();
|
||||
|
||||
for version_id in version_ids {
|
||||
versions.push(Self::get_full(version_id, exec).await?)
|
||||
}
|
||||
|
||||
Ok(versions)
|
||||
/* futures::future::try_join_all(version_ids.into_iter().map(|id| Self::get_full(id, exec)))
|
||||
.await*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user