Bulk Editing + Random Projects Route (#517)

* Bulk Editing + Random Projects Route

* Run fmt + clippy + prepare

* Remove license_url
This commit is contained in:
Geometrically
2023-01-04 19:23:47 -07:00
committed by GitHub
parent 88a4f25689
commit 7d195367a8
11 changed files with 609 additions and 174 deletions

View File

@@ -110,7 +110,7 @@ generate_ids!(
#[sqlx(transparent)]
pub struct UserId(pub i64);
#[derive(Copy, Clone, Debug, Type)]
#[derive(Copy, Clone, Debug, Type, Eq, PartialEq)]
#[sqlx(transparent)]
pub struct TeamId(pub i64);
#[derive(Copy, Clone, Debug, Type)]

View File

@@ -784,7 +784,7 @@ impl Project {
}
pub async fn get_many_full<'a, E>(
project_ids: Vec<ProjectId>,
project_ids: &[ProjectId],
exec: E,
) -> Result<Vec<QueryProject>, sqlx::Error>
where
@@ -793,7 +793,7 @@ impl Project {
use futures::TryStreamExt;
let project_ids_parsed: Vec<i64> =
project_ids.into_iter().map(|x| x.0).collect();
project_ids.iter().map(|x| x.0).collect();
sqlx::query!(
"
SELECT m.id id, m.project_type project_type, m.title title, m.description description, m.downloads downloads, m.follows follows,