🩹 Fix even more stupid
Emergency patch #1, fixes the fact that User.getUser() would not return ReturnedUser
This commit is contained in:
parent
cfd04e6ec9
commit
0f5eec7561
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { CreditAmount, PaymentEntity } from './types/Types'
|
import { CreditAmount, PaymentEntity } from './types/Types'
|
||||||
import { ConfigUser } from './interfaces/Interfaces'
|
import { ConfigUser, ReturnedUser } from './interfaces/Interfaces'
|
||||||
|
|
||||||
const userURL = 'https://api.spookvooper.com/user'
|
const userURL = 'https://api.spookvooper.com/user'
|
||||||
const ecoURL = 'https://api.spookvooper.com/eco'
|
const ecoURL = 'https://api.spookvooper.com/eco'
|
||||||
|
@ -29,7 +29,7 @@ class User {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getUser (): Promise<any> {
|
public async getUser (): Promise<ReturnedUser> {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
axios.get(`${userURL}/getUser`, {
|
axios.get(`${userURL}/getUser`, {
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { CreditAmount, PaymentEntity } from './types/Types'
|
import { CreditAmount, PaymentEntity } from './types/Types'
|
||||||
import { ConfigUser } from './interfaces/Interfaces'
|
import { ConfigUser, ReturnedUser } from './interfaces/Interfaces'
|
||||||
declare class User {
|
declare class User {
|
||||||
private readonly accountid
|
private readonly accountid
|
||||||
private readonly authkey
|
private readonly authkey
|
||||||
constructor (config: ConfigUser);
|
constructor (config: ConfigUser);
|
||||||
getUser (): Promise<any>;
|
getUser (): Promise<ReturnedUser>;
|
||||||
getUsername (): Promise<any>;
|
getUsername (): Promise<any>;
|
||||||
getBalance (): Promise<any>;
|
getBalance (): Promise<any>;
|
||||||
hasDiscordRole (role: string): Promise<any>;
|
hasDiscordRole (role: string): Promise<any>;
|
||||||
|
|
Loading…
Reference in New Issue