RestURL static const

This commit is contained in:
s-prechtl 2023-01-20 15:34:36 +01:00
parent 8a538bb85f
commit c052d08e0e
4 changed files with 11 additions and 6 deletions

View file

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