mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
clear remote ids on sign in
This commit is contained in:
parent
2c9129c7b6
commit
2e5a324669
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@ import axios, { AxiosError, AxiosInstance } from "axios";
|
||||||
import { WindowManager } from "./window-manager";
|
import { WindowManager } from "./window-manager";
|
||||||
import url from "url";
|
import url from "url";
|
||||||
import { uploadGamesBatch } from "./library-sync";
|
import { uploadGamesBatch } from "./library-sync";
|
||||||
|
import { clearGamesRemoteIds } from "./library-sync/clear-games-remote-id";
|
||||||
|
|
||||||
export class HydraApi {
|
export class HydraApi {
|
||||||
private static instance: AxiosInstance;
|
private static instance: AxiosInstance;
|
||||||
|
@ -50,6 +51,7 @@ export class HydraApi {
|
||||||
|
|
||||||
if (WindowManager.mainWindow) {
|
if (WindowManager.mainWindow) {
|
||||||
WindowManager.mainWindow.webContents.send("on-signin");
|
WindowManager.mainWindow.webContents.send("on-signin");
|
||||||
|
await clearGamesRemoteIds();
|
||||||
uploadGamesBatch();
|
uploadGamesBatch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5
src/main/services/library-sync/clear-games-remote-id.ts
Normal file
5
src/main/services/library-sync/clear-games-remote-id.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import { gameRepository } from "@main/repository";
|
||||||
|
|
||||||
|
export const clearGamesRemoteIds = () => {
|
||||||
|
return gameRepository.update({}, { remoteId: null });
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue