Add session stats to desktop app

This commit is contained in:
Igor Katson 2024-08-21 13:22:22 +01:00
parent 857db0caf4
commit 93c53b4285
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
5 changed files with 17 additions and 3 deletions

View file

@ -6,6 +6,7 @@ import {
TorrentDetails,
TorrentStats,
ErrorDetails,
SessionStats,
} from "rqbit-webui/src/api-types";
import { InvokeArgs, invoke } from "@tauri-apps/api/tauri";
@ -141,5 +142,8 @@ export const makeAPI = (configuration: RqbitDesktopConfig): RqbitAPI => {
}
return `${httpBase}/torrents/${index}/playlist`;
},
stats: () => {
return invokeAPI<SessionStats>("stats");
},
};
};