mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 05:24:55 +03:00
feat: remove hame achievements from remote db
This commit is contained in:
parent
c60cd4bee4
commit
bfdc2787d4
@ -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,
|
||||
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user