mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: prevent api calls when user is not logged in
This commit is contained in:
parent
9870213fff
commit
dd23358a95
11 changed files with 39 additions and 43 deletions
|
@ -19,7 +19,7 @@ const removeGameFromLibrary = async (
|
|||
const removeRemoveGameFromLibrary = async (gameId: number) => {
|
||||
const game = await gameRepository.findOne({ where: { id: gameId } });
|
||||
|
||||
if (game?.remoteId) {
|
||||
if (game?.remoteId && HydraApi.isLoggedIn()) {
|
||||
HydraApi.delete(`/games/${game.remoteId}`);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue