You've already forked AstralRinth
forked from didirus/AstralRinth
Make changelog in version response optional (#5115)
* Make changelog on version routes optional * fix clippy * fix ci
This commit is contained in:
@@ -306,7 +306,8 @@ pub struct LegacyVersion {
|
||||
pub featured: bool,
|
||||
pub name: String,
|
||||
pub version_number: String,
|
||||
pub changelog: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub changelog: Option<String>,
|
||||
pub changelog_url: Option<String>,
|
||||
pub date_published: DateTime<Utc>,
|
||||
pub downloads: u32,
|
||||
|
||||
@@ -661,7 +661,8 @@ pub struct Version {
|
||||
/// Games for which this version is compatible with, extracted from Loader/Project types
|
||||
pub games: Vec<String>,
|
||||
/// The changelog for this version of the project.
|
||||
pub changelog: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub changelog: Option<String>,
|
||||
|
||||
/// The date that this version was published.
|
||||
pub date_published: DateTime<Utc>,
|
||||
@@ -714,7 +715,7 @@ impl From<VersionQueryResult> for Version {
|
||||
version_number: v.version_number,
|
||||
project_types: data.project_types,
|
||||
games: data.games,
|
||||
changelog: v.changelog,
|
||||
changelog: Some(v.changelog),
|
||||
date_published: v.date_published,
|
||||
downloads: v.downloads as u32,
|
||||
version_type: match v.version_type.as_str() {
|
||||
|
||||
Reference in New Issue
Block a user