From 2163d4465f86130d9cd3b677460c69d4a4f2f12b Mon Sep 17 00:00:00 2001 From: Jai A Date: Sun, 7 Mar 2021 17:07:32 -0700 Subject: [PATCH] Fix license field not working: --- src/search/indexing/local_import.rs | 4 ++-- src/search/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/search/indexing/local_import.rs b/src/search/indexing/local_import.rs index 8b8729248..85a5906e4 100644 --- a/src/search/indexing/local_import.rs +++ b/src/search/indexing/local_import.rs @@ -162,7 +162,7 @@ pub async fn index_local(pool: PgPool) -> Result, IndexingE date_modified: mod_data.updated, modified_timestamp: mod_data.updated.timestamp(), latest_version, - license: license.short, + license: Some(license.short), client_side: client_side.to_string(), server_side: server_side.to_string(), host: Cow::Borrowed("modrinth"), @@ -311,7 +311,7 @@ pub async fn query_one( date_modified: mod_data.updated, modified_timestamp: mod_data.updated.timestamp(), latest_version, - license: license.short, + license: Some(license.short), client_side: client_side.to_string(), server_side: server_side.to_string(), host: Cow::Borrowed("modrinth"), diff --git a/src/search/mod.rs b/src/search/mod.rs index 44612265e..1096474db 100644 --- a/src/search/mod.rs +++ b/src/search/mod.rs @@ -74,7 +74,7 @@ pub struct UploadSearchMod { pub icon_url: String, pub author_url: String, pub latest_version: Cow<'static, str>, - pub license: String, + pub license: Option, pub client_side: String, pub server_side: String, @@ -117,7 +117,7 @@ pub struct ResultSearchMod { /// RFC 3339 formatted modification date of the mod pub date_modified: String, pub latest_version: String, - pub license: String, + pub license: Option, pub client_side: String, pub server_side: String,