You've already forked AstralRinth
forked from didirus/AstralRinth
Update file restrictions, download counting, project colors, etc (#515)
* Update file restrictions, download counting, project colors, etc * Run fmt + clippy + prepare
This commit is contained in:
@@ -70,9 +70,6 @@ pub async fn index_local(
|
||||
_ => false,
|
||||
};
|
||||
|
||||
let mut gallery = m.featured_gallery.unwrap_or_default();
|
||||
gallery.append(&mut m.gallery.unwrap_or_default());
|
||||
|
||||
UploadSearchProject {
|
||||
project_id: project_id.to_string(),
|
||||
title: m.title,
|
||||
@@ -93,10 +90,11 @@ pub async fn index_local(
|
||||
server_side: m.server_side_type,
|
||||
slug: m.slug,
|
||||
project_type: m.project_type_name,
|
||||
gallery,
|
||||
gallery: m.gallery.unwrap_or_default(),
|
||||
display_categories,
|
||||
open_source,
|
||||
color: m.color.map(|x| x as u32),
|
||||
featured_gallery: m.featured_gallery.unwrap_or_default().first().cloned(),
|
||||
}
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -198,6 +198,8 @@ const DEFAULT_DISPLAYED_ATTRIBUTES: &[&str] = &[
|
||||
"client_side",
|
||||
"server_side",
|
||||
"gallery",
|
||||
"featured_gallery",
|
||||
"color",
|
||||
];
|
||||
|
||||
const DEFAULT_SEARCHABLE_ATTRIBUTES: &[&str] =
|
||||
@@ -218,6 +220,7 @@ const DEFAULT_ATTRIBUTES_FOR_FACETING: &[&str] = &[
|
||||
"date_modified",
|
||||
"project_id",
|
||||
"open_source",
|
||||
"color",
|
||||
];
|
||||
|
||||
const DEFAULT_SORTABLE_ATTRIBUTES: &[&str] =
|
||||
|
||||
Reference in New Issue
Block a user