LocalStorageListener

This commit is contained in:
s-prechtl 2023-01-20 15:04:51 +01:00
parent b6ad404555
commit a0ab1b7f56
4 changed files with 70 additions and 16 deletions

View file

@ -19,6 +19,7 @@
import LeaderboardEntry from "@/components/LeaderboardEntry.vue";
import RRButton from "@/components/RRButton.vue";
import App from "@/App.vue";
export default {
name: "Leaderboard",
@ -44,7 +45,7 @@ export default {
},
methods: {
async fetchPage() {
let res = await fetch(`http://localhost:3000/leaderboard/${this.type}?pagination=true&entriesPerPage=${this.entriesPerPage}&page=${this.pageNumber}`, {method: "GET"});
let res = await fetch(`${App.data().restUrl}/leaderboard/${this.type}?pagination=true&entriesPerPage=${this.entriesPerPage}&page=${this.pageNumber}`, {method: "GET"});
return await res.json();
},
title() {