Fix Plugin/Datapack creation and featuring (#836)
This commit is contained in:
parent
75e5bec962
commit
aee9b6a951
@ -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,
|
||||
|
||||
@ -773,7 +773,7 @@ pub async fn version_list(
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
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?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user