Skip to content

Commit 7fd048d

Browse files
committed
Add endpoints option
1 parent 5347de8 commit 7fd048d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

plugins/updater/guest-js/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ interface CheckOptions {
2222
* Target identifier for the running application. This is sent to the backend.
2323
*/
2424
target?: string
25+
26+
endpoints?: string[]
2527
}
2628

2729
/** Options used when downloading an update */

plugins/updater/src/commands.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub(crate) async fn check<R: Runtime>(
4747
timeout: Option<u64>,
4848
proxy: Option<String>,
4949
target: Option<String>,
50+
endpoints: Option<Vec<Url>>,
5051
) -> Result<Metadata> {
5152
let mut builder = webview.updater_builder();
5253
if let Some(headers) = headers {
@@ -64,6 +65,9 @@ pub(crate) async fn check<R: Runtime>(
6465
if let Some(target) = target {
6566
builder = builder.target(target);
6667
}
68+
if let Some(endpoints) = endpoints {
69+
builder = builder.endpoints(endpoints)?;
70+
}
6771

6872
let updater = builder.build()?;
6973
let update = updater.check().await?;

0 commit comments

Comments
 (0)