Skip to content

Commit

Permalink
fix circular dependency (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmelhado authored Aug 17, 2021
1 parent 15e3c8a commit 0d9729a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/routes/api/checkGlobalVersion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {version} from '$lib/version';

export async function get() {
return {
status: 200,
body: JSON.stringify(version)
};
}
2 changes: 1 addition & 1 deletion src/routes/api/checkVersion.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {version} from '$lib/version';

export async function get() {
const res = await fetch('https://league-page.nmelhado.com/api/checkVersion', {compress: true})
const res = await fetch('https://league-page.nmelhado.com/api/checkGlobalVersion', {compress: true})
let needsUpdate = false;
if(res.ok) {
const globalVersion = await res.json();
Expand Down

0 comments on commit 0d9729a

Please sign in to comment.