From 0f5eec7561c47a0b72432895f7bf5af011d97f5b Mon Sep 17 00:00:00 2001 From: Brendan Lane Date: Thu, 24 Dec 2020 14:37:09 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20even=20more=20stupid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emergency patch #1, fixes the fact that User.getUser() would not return ReturnedUser --- src/modules/User.ts | 4 ++-- typings/modules/User.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/User.ts b/src/modules/User.ts index 1ca6663..9c2e9a1 100644 --- a/src/modules/User.ts +++ b/src/modules/User.ts @@ -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 { + public async getUser (): Promise { return await new Promise((resolve, reject) => { axios.get(`${userURL}/getUser`, { params: { diff --git a/typings/modules/User.d.ts b/typings/modules/User.d.ts index 645bea2..5fa6c28 100644 --- a/typings/modules/User.d.ts +++ b/typings/modules/User.d.ts @@ -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; + getUser (): Promise; getUsername (): Promise; getBalance (): Promise; hasDiscordRole (role: string): Promise;