feat: getMe on launch

This commit is contained in:
Zamitto 2024-10-21 15:01:43 -03:00
parent d801bad49e
commit df5f82d47f
5 changed files with 89 additions and 72 deletions

View file

@ -12,6 +12,7 @@ import { UserPreferences } from "./entity";
import { RealDebridClient } from "./services/real-debrid";
import { HydraApi } from "./services/hydra-api";
import { uploadGamesBatch } from "./services/library-sync";
import { getUserData } from "./services/user/get-user-data";
const loadState = async (userPreferences: UserPreferences | null) => {
import("./events");
@ -22,7 +23,8 @@ const loadState = async (userPreferences: UserPreferences | null) => {
Ludusavi.addManifestToLudusaviConfig();
HydraApi.setupApi().then(() => {
HydraApi.setupApi().then(async () => {
await getUserData().catch(() => {});
uploadGamesBatch();
});