From a0fe5d3f816396d586f443dfc5e881f6e374ee9d Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 29 Nov 2023 15:37:37 +0100 Subject: [PATCH] nexusmods: Fix File type --- lib/nexusmods/src/lib.rs | 2 +- lib/nexusmods/src/types.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nexusmods/src/lib.rs b/lib/nexusmods/src/lib.rs index 0cca768..06c1f01 100644 --- a/lib/nexusmods/src/lib.rs +++ b/lib/nexusmods/src/lib.rs @@ -117,7 +117,7 @@ impl Api { let Some(file) = files .files .into_iter() - .find(|file| file.updated_timestamp == timestamp) + .find(|file| file.uploaded_timestamp == timestamp) else { let err = Error::Custom("Timestamp does not match any file".into()); return Err(err); diff --git a/lib/nexusmods/src/types.rs b/lib/nexusmods/src/types.rs index b88911e..db0f624 100644 --- a/lib/nexusmods/src/types.rs +++ b/lib/nexusmods/src/types.rs @@ -77,13 +77,13 @@ pub struct File { pub size: u64, pub file_name: String, #[serde(with = "time::serde::timestamp")] - pub updated_timestamp: OffsetDateTime, + pub uploaded_timestamp: OffsetDateTime, pub mod_version: String, pub external_virus_scan_url: String, pub description: String, pub size_kb: u64, pub size_in_bytes: u64, - pub changelog_html: String, + pub changelog_html: Option, pub content_preview_link: String, }