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

@@ -91,14 +91,14 @@ pub async fn mods_get(
ids: web::Query<ProjectIds>,
pool: web::Data<PgPool>,
) -> Result<HttpResponse, ApiError> {
let project_ids =
let project_ids: Vec<database::models::ids::ProjectId> =
serde_json::from_str::<Vec<models::ids::ProjectId>>(&ids.ids)?
.into_iter()
.map(|x| x.into())
.collect();
let projects_data =
database::models::Project::get_many_full(project_ids, &**pool).await?;
database::models::Project::get_many_full(&project_ids, &**pool).await?;
let user_option = get_user_from_headers(req.headers(), &**pool).await.ok();