mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding link to game running
This commit is contained in:
parent
8afb3c27dc
commit
2f4d1396a9
3 changed files with 26 additions and 19 deletions
|
@ -4,8 +4,8 @@ import { dataSource } from "@main/data-source";
|
|||
import { DownloadQueue, Game, UserAuth } from "@main/entity";
|
||||
|
||||
const signOut = async (_event: Electron.IpcMainInvokeEvent) => {
|
||||
const databaseOperations = dataSource.transaction(
|
||||
async (transactionalEntityManager) => {
|
||||
const databaseOperations = dataSource
|
||||
.transaction(async (transactionalEntityManager) => {
|
||||
await transactionalEntityManager.getRepository(DownloadQueue).delete({});
|
||||
|
||||
await transactionalEntityManager.getRepository(Game).delete({});
|
||||
|
@ -13,11 +13,11 @@ const signOut = async (_event: Electron.IpcMainInvokeEvent) => {
|
|||
await transactionalEntityManager
|
||||
.getRepository(UserAuth)
|
||||
.delete({ id: 1 });
|
||||
}
|
||||
);
|
||||
|
||||
/* Removes all games being played */
|
||||
gamesPlaytime.clear();
|
||||
})
|
||||
.then(() => {
|
||||
/* Removes all games being played */
|
||||
gamesPlaytime.clear();
|
||||
});
|
||||
|
||||
/* Disconnects aria2 */
|
||||
DownloadManager.disconnect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue