fix: tournamnet: can join tournament
This commit is contained in:
@ -79,7 +79,7 @@ class Tourmanent
|
||||
*/
|
||||
async init()
|
||||
{
|
||||
let response = await this.client._get(`/api/tournaments/${id}`);
|
||||
let response = await this.client._get(`/api/tournaments/${this.id}`);
|
||||
|
||||
if (response.status !== 200)
|
||||
return response.status;
|
||||
|
@ -17,12 +17,12 @@ class Tourmanents
|
||||
/**
|
||||
*
|
||||
* @param {Number} id
|
||||
* @returns {?Promise<Tournament>}
|
||||
* @returns {Promise<Tournament>}
|
||||
*/
|
||||
async getTournament(id)
|
||||
{
|
||||
let tournament = new Tourmanent(this.client);
|
||||
if (await tournament.init(id))
|
||||
let tournament = new Tourmanent(this.client, id);
|
||||
if (await tournament.init())
|
||||
return null;
|
||||
return tournament;
|
||||
}
|
||||
|
Reference in New Issue
Block a user