mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: own tab to torbox
This commit is contained in:
parent
7fbaea15e8
commit
ebc70ce28f
33 changed files with 256 additions and 141 deletions
14
src/main/events/user-preferences/authenticate-torbox.ts
Normal file
14
src/main/events/user-preferences/authenticate-torbox.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { registerEvent } from "../register-event";
|
||||
import { TorBoxClient } from "@main/services/download/torbox";
|
||||
|
||||
const authenticateTorBox = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
apiToken: string
|
||||
) => {
|
||||
TorBoxClient.authorize(apiToken);
|
||||
|
||||
const user = await TorBoxClient.getUser();
|
||||
return user;
|
||||
};
|
||||
|
||||
registerEvent("authenticateTorBox", authenticateTorBox);
|
Loading…
Add table
Add a link
Reference in a new issue