history
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
import type { MatchHistory } from "./Match";
|
||||
|
||||
export let user;
|
||||
let matchList: MatchHistory[] = [];
|
||||
|
||||
let matchList = [];
|
||||
onMount( async() => {
|
||||
console.log(user.username + 'jjjjjjjjjjjjj')
|
||||
matchList = await fetchMatchList(user.username);
|
||||
console.log(matchList);
|
||||
// matchList = await mockMatchList(user.username);
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
async function fetchMatchList(username: string)
|
||||
{
|
||||
let url = `http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/game/match/history/${username}`;
|
||||
|
||||
let url = `http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/game/match/history?username=${username}`;
|
||||
console.log(url + 'ffffffff')
|
||||
return fetch(url)
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user