Skip to content

Commit

Permalink
Merge pull request #326 from dysolix/patch-note-checker-fix
Browse files Browse the repository at this point in the history
Fixed patch note checker
  • Loading branch information
Querijn authored Jun 20, 2024
2 parents 92bb349 + 29d40a0 commit 2f39857
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/VersionChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ export default class VersionChecker {
patchNotes = `https://www.leagueoflegends.com/en-us/news/game-updates/patch-${nextMajor.toString()}-${nextMinor.toString()}-notes/`;
tries++;

let response = await fetch(`https://www.leagueoflegends.com/page-data/en-us/news/game-updates/patch-${nextMajor.toString()}-${nextMinor.toString()}-notes/page-data.json`, {
let response = await fetch(patchNotes, {
method: "GET",
});

if (response.ok && response.headers.get("Content-Type") === "application/json") {
if (response.ok) {
lastNewValidMajor = nextMajor;
lastNewValidMinor = nextMinor;
validPatchNotes = patchNotes;
Expand All @@ -123,11 +123,11 @@ export default class VersionChecker {
patchNotes = `https://www.leagueoflegends.com/en-us/news/game-updates/patch-${nextMajor.toString()}-${nextMinor.toString()}-notes/`;
tries++;

response = await fetch(`https://www.leagueoflegends.com/page-data/en-us/news/game-updates/patch-${nextMajor.toString()}-${nextMinor.toString()}-notes/page-data.json`, {
response = await fetch(patchNotes, {
method: "GET",
});

if (response.ok && response.headers.get("Content-Type") === "application/json") {
if (response.ok) {
lastNewValidMajor = nextMajor;
lastNewValidMinor = nextMinor;
validPatchNotes = patchNotes;
Expand Down

0 comments on commit 2f39857

Please sign in to comment.