game: add: docstring
This commit is contained in:
@ -12,7 +12,12 @@ class Account
|
||||
*/
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} username
|
||||
* @param {String} password
|
||||
* @returns
|
||||
*/
|
||||
async create(username, password)
|
||||
{
|
||||
let response = await this.client._post("/api/accounts/register", {username: username, password: password});
|
||||
@ -26,6 +31,10 @@ class Account
|
||||
return response_data
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} password
|
||||
* @returns
|
||||
*/
|
||||
async delete(password)
|
||||
{
|
||||
let response = await this.client._delete("/api/accounts/delete", {password: password});
|
||||
@ -41,6 +50,10 @@ class Account
|
||||
return response_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get account data (username)
|
||||
* @returns
|
||||
*/
|
||||
async get()
|
||||
{
|
||||
let response = await this.client._get("/api/accounts/edit");
|
||||
@ -54,6 +67,12 @@ class Account
|
||||
return response_data;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} data
|
||||
* @param {Number} password
|
||||
* @returns
|
||||
*/
|
||||
async update(data, password)
|
||||
{
|
||||
data.current_password = password;
|
||||
@ -65,6 +84,7 @@ class Account
|
||||
this.client._update_logged(false);
|
||||
return null;
|
||||
}
|
||||
|
||||
return response_data;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user