🩹 Fix even more stupid

Emergency patch #1, fixes the fact that User.getUser() would not return ReturnedUser
This commit is contained in:
Brendan Lane 2020-12-24 14:37:09 -05:00
parent cfd04e6ec9
commit 0f5eec7561
No known key found for this signature in database
GPG Key ID: 906880739CCF90C9
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
import axios from 'axios'
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 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) => {
axios.get(`${userURL}/getUser`, {
params: {

View File

@ -1,10 +1,10 @@
import { CreditAmount, PaymentEntity } from './types/Types'
import { ConfigUser } from './interfaces/Interfaces'
import { ConfigUser, ReturnedUser } from './interfaces/Interfaces'
declare class User {
private readonly accountid
private readonly authkey
constructor (config: ConfigUser);
getUser (): Promise<any>;
getUser (): Promise<ReturnedUser>;
getUsername (): Promise<any>;
getBalance (): Promise<any>;
hasDiscordRole (role: string): Promise<any>;