mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: save torbox token
This commit is contained in:
parent
e3b9b16387
commit
d8e322e022
8 changed files with 27 additions and 19 deletions
|
@ -20,6 +20,7 @@ import {
|
|||
} from "./level";
|
||||
import { Auth, User, type UserPreferences } from "@types";
|
||||
import { knexClient } from "./knex-client";
|
||||
import { TorBoxClient } from "./services/download/torbox";
|
||||
|
||||
export const loadState = async () => {
|
||||
const userPreferences = await migrateFromSqlite().then(async () => {
|
||||
|
@ -42,6 +43,10 @@ export const loadState = async () => {
|
|||
);
|
||||
}
|
||||
|
||||
if (userPreferences?.torBoxApiToken) {
|
||||
TorBoxClient.authorize(Crypto.decrypt(userPreferences.torBoxApiToken));
|
||||
}
|
||||
|
||||
Ludusavi.addManifestToLudusaviConfig();
|
||||
|
||||
HydraApi.setupApi().then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue