diff --git a/src/routes/v2/tags.rs b/src/routes/v2/tags.rs index 7d1fcfeea..cf8cb5012 100644 --- a/src/routes/v2/tags.rs +++ b/src/routes/v2/tags.rs @@ -90,6 +90,12 @@ pub async fn loader_list( supported_project_types.push("modpack".to_string()); } + if supported_project_types.contains(&"datapack".to_string()) + || supported_project_types.contains(&"plugin".to_string()) + { + supported_project_types.push("mod".to_string()); + } + LoaderData { icon: l.icon, name: l.name, diff --git a/src/routes/v3/versions.rs b/src/routes/v3/versions.rs index fc9acb1ea..01c80929b 100644 --- a/src/routes/v3/versions.rs +++ b/src/routes/v3/versions.rs @@ -773,7 +773,7 @@ pub async fn version_list( .cloned() .collect::>(); - versions.sort(); + versions.sort_by(|a, b| b.inner.date_published.cmp(&a.inner.date_published)); // Attempt to populate versions with "auto featured" versions if response.is_empty() && !versions.is_empty() && filters.featured.unwrap_or(false) { @@ -823,8 +823,7 @@ pub async fn version_list( } } - response.sort(); - response.reverse(); + response.sort_by(|a, b| b.inner.date_published.cmp(&a.inner.date_published)); response.dedup_by(|a, b| a.inner.id == b.inner.id); let response = filter_visible_versions(response, &user_option, &pool, &redis).await?;