update index to use approval date if set (#540)

Co-authored-by: MagnusHJensen <magnus.holm.jensen@lego.dk>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Magnus Jensen
2023-02-15 18:20:34 +01:00
committed by GitHub
parent dc15914a85
commit 7ec518b41c

View File

@@ -79,7 +79,7 @@ pub async fn index_local(
downloads: m.downloads,
icon_url: m.icon_url.unwrap_or_default(),
author: m.username,
date_created: m.published,
date_created: m.approved.unwrap_or(m.published),
created_timestamp: m.approved.unwrap_or(m.published).timestamp(),
date_modified: m.updated,
modified_timestamp: m.updated.timestamp(),