diff --git a/src/routes/api/checkGlobalVersion.js b/src/routes/api/checkGlobalVersion.js new file mode 100644 index 000000000..d95b202e0 --- /dev/null +++ b/src/routes/api/checkGlobalVersion.js @@ -0,0 +1,8 @@ +import {version} from '$lib/version'; + +export async function get() { + return { + status: 200, + body: JSON.stringify(version) + }; +} diff --git a/src/routes/api/checkVersion.js b/src/routes/api/checkVersion.js index 4d1a8ab6f..028eae435 100644 --- a/src/routes/api/checkVersion.js +++ b/src/routes/api/checkVersion.js @@ -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();