mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-10 05:33:47 +00:00
Migrated the installation of updates from Tauri JS to the runtime API
This commit is contained in:
2 files changed
+13
-5
No files matched your search
@@ -138,8 +138,16 @@ public sealed class Rust(string apiPort) : IDisposable
|
||||
|
||||
public async Task InstallUpdate(IJSRuntime jsRuntime)
|
||||
{
|
||||
var cts = new CancellationTokenSource();
|
||||
await jsRuntime.InvokeVoidAsync("window.__TAURI__.invoke", cts.Token, "install_update");
|
||||
try
|
||||
{
|
||||
var cts = new CancellationTokenSource();
|
||||
await this.http.GetAsync("/updates/install", cts.Token);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#region IDisposable
|
||||
|
||||
Reference in new issue
Block a user