Change server side and client side fields to optionals
This commit is contained in:
parent
2163d4465f
commit
5b0cc73792
@ -163,8 +163,8 @@ pub async fn index_local(pool: PgPool) -> Result<Vec<UploadSearchMod>, IndexingE
|
|||||||
modified_timestamp: mod_data.updated.timestamp(),
|
modified_timestamp: mod_data.updated.timestamp(),
|
||||||
latest_version,
|
latest_version,
|
||||||
license: Some(license.short),
|
license: Some(license.short),
|
||||||
client_side: client_side.to_string(),
|
client_side: Some(client_side.to_string()),
|
||||||
server_side: server_side.to_string(),
|
server_side: Some(server_side.to_string()),
|
||||||
host: Cow::Borrowed("modrinth"),
|
host: Cow::Borrowed("modrinth"),
|
||||||
slug: mod_data.slug,
|
slug: mod_data.slug,
|
||||||
});
|
});
|
||||||
@ -312,8 +312,8 @@ pub async fn query_one(
|
|||||||
modified_timestamp: mod_data.updated.timestamp(),
|
modified_timestamp: mod_data.updated.timestamp(),
|
||||||
latest_version,
|
latest_version,
|
||||||
license: Some(license.short),
|
license: Some(license.short),
|
||||||
client_side: client_side.to_string(),
|
client_side: Some(client_side.to_string()),
|
||||||
server_side: server_side.to_string(),
|
server_side: Some(server_side.to_string()),
|
||||||
host: Cow::Borrowed("modrinth"),
|
host: Cow::Borrowed("modrinth"),
|
||||||
slug: mod_data.slug,
|
slug: mod_data.slug,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -75,8 +75,8 @@ pub struct UploadSearchMod {
|
|||||||
pub author_url: String,
|
pub author_url: String,
|
||||||
pub latest_version: Cow<'static, str>,
|
pub latest_version: Cow<'static, str>,
|
||||||
pub license: Option<String>,
|
pub license: Option<String>,
|
||||||
pub client_side: String,
|
pub client_side: Option<String>,
|
||||||
pub server_side: String,
|
pub server_side: Option<String>,
|
||||||
|
|
||||||
/// RFC 3339 formatted creation date of the mod
|
/// RFC 3339 formatted creation date of the mod
|
||||||
pub date_created: DateTime<Utc>,
|
pub date_created: DateTime<Utc>,
|
||||||
@ -118,8 +118,8 @@ pub struct ResultSearchMod {
|
|||||||
pub date_modified: String,
|
pub date_modified: String,
|
||||||
pub latest_version: String,
|
pub latest_version: String,
|
||||||
pub license: Option<String>,
|
pub license: Option<String>,
|
||||||
pub client_side: String,
|
pub client_side: Option<String>,
|
||||||
pub server_side: String,
|
pub server_side: Option<String>,
|
||||||
|
|
||||||
/// The host of the mod: Either `modrinth` or `curseforge`
|
/// The host of the mod: Either `modrinth` or `curseforge`
|
||||||
pub host: String,
|
pub host: String,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user