mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: use convertSteamGameToCatalogueEntry
This commit is contained in:
parent
56f0439aaf
commit
3f0a1207e9
2 changed files with 16 additions and 5 deletions
|
|
@ -4,6 +4,7 @@ import { logger } from "@main/services";
|
|||
import { HydraApi } from "@main/services/hydra-api";
|
||||
import { steamGamesWorker } from "@main/workers";
|
||||
import { UserProfile } from "@types";
|
||||
import { convertSteamGameToCatalogueEntry } from "../helpers/search-games";
|
||||
|
||||
const getUserProfile = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
|
|
@ -19,7 +20,7 @@ const getUserProfile = async (
|
|||
name: "getById",
|
||||
});
|
||||
|
||||
return { ...game, title: steamGame.name, objectId: game.objectId };
|
||||
return convertSteamGameToCatalogueEntry(steamGame);
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -28,7 +29,7 @@ const getUserProfile = async (
|
|||
const steamGame = await steamGamesWorker.run(Number(game.objectId), {
|
||||
name: "getById",
|
||||
});
|
||||
return { ...game, title: steamGame.name, objectID: game.objectId };
|
||||
return convertSteamGameToCatalogueEntry(steamGame);
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue