feat: dispatching event when remote games are fetched

This commit is contained in:
Chubby Granny Chaser 2024-06-19 02:35:57 +01:00
parent ca81281f1f
commit 944f3891bf
No known key found for this signature in database
8 changed files with 31 additions and 17 deletions

View file

@ -2,7 +2,7 @@ import { userAuthRepository } from "@main/repository";
import axios, { AxiosError, AxiosInstance } from "axios";
import { WindowManager } from "./window-manager";
import url from "url";
import { getRemoteGames, uploadBatchGames } from "./library-sync";
import { uploadGamesBatch } from "./library-sync";
export class HydraApi {
private static instance: AxiosInstance;
@ -50,9 +50,7 @@ export class HydraApi {
if (WindowManager.mainWindow) {
WindowManager.mainWindow.webContents.send("on-signin");
await uploadBatchGames();
await getRemoteGames();
uploadGamesBatch();
}
}