profile: add: game history

This commit is contained in:
2024-05-13 13:50:33 +02:00
parent f576dc208f
commit 5675f64268
6 changed files with 85 additions and 100 deletions

View File

@ -75,14 +75,14 @@ export class Profile extends AExchangeable
}
/**
* @returns {[Object]}
* @returns {Promise<[Object]>}
*/
async getGameHistory()
{
let response = await this.client._get(`/api/games/history/${this.id}`);
let response_data = await response.json();
const response = await this.client._get(`/api/games/history/${this.id}`);
const response_data = await response.json();
let games = [];
const games = [];
response_data.forEach(game_data => {
games.push(game_data);