You've already forked AstralRinth
forked from didirus/AstralRinth
Switch to time crate, add file sizes (#329)
* Switch to time crate, add file sizes * Update deps, adjust pack format * Run formatter, fix clippy
This commit is contained in:
@@ -68,9 +68,9 @@ pub async fn index_local(
|
||||
icon_url: m.icon_url.unwrap_or_default(),
|
||||
author: m.username,
|
||||
date_created: m.published,
|
||||
created_timestamp: m.published.timestamp(),
|
||||
created_timestamp: m.published.unix_timestamp(),
|
||||
date_modified: m.updated,
|
||||
modified_timestamp: m.updated.timestamp(),
|
||||
modified_timestamp: m.updated.unix_timestamp(),
|
||||
latest_version: versions.last().cloned().unwrap_or_else(|| "None".to_string()),
|
||||
versions,
|
||||
license: m.short,
|
||||
@@ -142,9 +142,9 @@ pub async fn query_one(
|
||||
icon_url: m.icon_url.unwrap_or_default(),
|
||||
author: m.username,
|
||||
date_created: m.published,
|
||||
created_timestamp: m.published.timestamp(),
|
||||
created_timestamp: m.published.unix_timestamp(),
|
||||
date_modified: m.updated,
|
||||
modified_timestamp: m.updated.timestamp(),
|
||||
modified_timestamp: m.updated.unix_timestamp(),
|
||||
latest_version: versions
|
||||
.last()
|
||||
.cloned()
|
||||
|
||||
@@ -17,7 +17,7 @@ pub enum IndexingError {
|
||||
#[error("Error while serializing or deserializing JSON: {0}")]
|
||||
Serde(#[from] serde_json::Error),
|
||||
#[error("Error while parsing a timestamp: {0}")]
|
||||
ParseDate(#[from] chrono::format::ParseError),
|
||||
ParseDate(#[from] time::error::Error),
|
||||
#[error("Database Error: {0}")]
|
||||
Sqlx(#[from] sqlx::error::Error),
|
||||
#[error("Database Error: {0}")]
|
||||
|
||||
Reference in New Issue
Block a user