credits balance also a string
This commit is contained in:
parent
dda4dfd22a
commit
9ec6768b56
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ export default class CreditsManager {
|
|||
* @param {number} id - The ID of the user.
|
||||
* @return {Promise<number>} The balance of the user.
|
||||
*/
|
||||
async balance(id: number) {
|
||||
async balance(id: string|number) {
|
||||
let req = await axios.get(`${this.URL}/credits/${id}`);
|
||||
if (req.status == 404) throw new Error("User not found");
|
||||
return req.data.credits;
|
||||
|
|
Loading…
Reference in a new issue