Skip to content

Commit

Permalink
feat: remove hame achievements from remote db
Browse files Browse the repository at this point in the history
  • Loading branch information
Hachi-R committed Jan 2, 2025
1 parent c60cd4b commit bfdc278
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/events/library/reset-game-achievements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { findAchievementFiles } from "@main/services/achievements/find-achivemen
import fs from "fs";
import { WindowManager } from "@main/services";
import { getUnlockedAchievements } from "../user/get-unlocked-achievements";
import { HydraApi } from "@main/services/hydra-api";

const resetGameAchievements = async (
_event: Electron.IpcMainInvokeEvent,
Expand Down Expand Up @@ -34,7 +35,11 @@ const resetGameAchievements = async (
}
);

// TODO: remove from db
try {
await HydraApi.delete(`/profile/games/${game.remoteId}/achievements`);
} catch (error) {
console.error(error);
}

const gameAchievements = await getUnlockedAchievements(
game.objectID,
Expand Down

0 comments on commit bfdc278

Please sign in to comment.