From 1ed1189bec5f7e22a502e295054997291d4620d8 Mon Sep 17 00:00:00 2001 From: j-weissen Date: Fri, 20 Jan 2023 13:57:26 +0100 Subject: [PATCH] done --- frontend/src/App.vue | 10 ++------- frontend/src/components/Leaderboard.vue | 28 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b3491a9..3cdc6b1 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -12,10 +12,10 @@
- +
- +
@@ -55,15 +55,9 @@ export default defineComponent({ async fetchUserScores() { return await this.fetchFromApi(`/user/${this.userId}/scores`, "GET"); }, - async fetchLeaderboard(type: "highscore" | "totalplaytime") { - return await this.fetchFromApi(`/leaderboard/${type}`, "GET"); - }, }, async created() { this.userScores = await this.fetchUserScores(); - this.highscoreLeaderboard = await this.fetchLeaderboard("highscore") - this.totalPlaytimeLeaderboard = await this.fetchLeaderboard("totalplaytime") - console.log(this) } }); diff --git a/frontend/src/components/Leaderboard.vue b/frontend/src/components/Leaderboard.vue index ea780aa..41a62e0 100644 --- a/frontend/src/components/Leaderboard.vue +++ b/frontend/src/components/Leaderboard.vue @@ -1,7 +1,7 @@