Skip to content

Commit

Permalink
feat(updater): add body and date getters (#3802)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Mar 29, 2022
1 parent b14aa89 commit c7696f3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/update-response-methods.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Added `UpdateResponse::body` and `UpdateResponse::date`.
10 changes: 10 additions & 0 deletions core/tauri/src/updater/mod.rs
Expand Up @@ -637,6 +637,16 @@ impl<R: Runtime> UpdateResponse<R> {
&self.update.version
}

/// The update date.
pub fn date(&self) -> &str {
&self.update.date
}

/// The update description.
pub fn body(&self) -> Option<&String> {
self.update.body.as_ref()
}

/// Downloads and installs the update.
pub async fn download_and_install(self) -> Result<()> {
download_and_install(self.update).await
Expand Down

0 comments on commit c7696f3

Please sign in to comment.