Skip to content

Commit

Permalink
fix: sgdb api key now properly validates
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed May 3, 2024
1 parent a220e80 commit d4e94cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export async function validateSteamPath(steamPath: string): Promise<boolean> {
const wasAdded = await RustInterop.addPathToScope(normalized);
if (wasAdded && await fs.exists(normalized)) {
const contents = (await fs.readDir(normalized)).map((entry) => entry.name);
return contents.includes("steam.exe");
return contents.includes("steam.exe") || contents.includes("steam.sh");
}

return false;
Expand Down Expand Up @@ -248,8 +248,8 @@ export async function validateSGDBAPIKey(key: string): Promise<boolean> {

const apiModel = new SGDB(key);

const res = await apiModel.getGameById(5138060);
return res?.name === "Baldur's Gate 3";
const res = await apiModel.searchGame("s");
return res?.length > 0;
}

/**
Expand Down

0 comments on commit d4e94cb

Please sign in to comment.