game: add: docstring

This commit is contained in:
2024-01-22 13:21:51 +01:00
parent ab73826c11
commit 6fd11d0028
10 changed files with 231 additions and 12 deletions

View File

@ -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;
}
}