You've already forked AstralRinth
forked from didirus/AstralRinth
Bulk Editing + Random Projects Route (#517)
* Bulk Editing + Random Projects Route * Run fmt + clippy + prepare * Remove license_url
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user