diff options
author | mat <github@matdoes.dev> | 2022-03-28 17:45:35 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-28 17:45:35 +0000 |
commit | adc1a7af012744e5b837d07ed1919776b821cdc1 (patch) | |
tree | b47b74d8f99aa1f9fef9c11a5ac224473578bc19 /src/hypixelApi.ts | |
parent | 44a8aebcb40f1d02b93218bcf5ccfa8e87621abb (diff) | |
download | skyblock-api-adc1a7af012744e5b837d07ed1919776b821cdc1.tar.gz skyblock-api-adc1a7af012744e5b837d07ed1919776b821cdc1.tar.bz2 skyblock-api-adc1a7af012744e5b837d07ed1919776b821cdc1.zip |
update tests
Diffstat (limited to 'src/hypixelApi.ts')
-rw-r--r-- | src/hypixelApi.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hypixelApi.ts b/src/hypixelApi.ts index adc6378..5f2bfb1 100644 --- a/src/hypixelApi.ts +++ b/src/hypixelApi.ts @@ -98,7 +98,7 @@ export interface HypixelPlayerSocialMedia { /** Send an HTTP request to the Hypixel API */ -export let sendApiRequest = async<P extends keyof typedHypixelApi.Requests>(path: P, options: typedHypixelApi.Requests[P]['options']): Promise<typedHypixelApi.Requests[P]['response']> => { +export let sendApiRequest = async<P extends keyof typedHypixelApi.Requests>(path: P, options: typedHypixelApi.Requests[P]['options']): Promise<typedHypixelApi.Requests[P]['response']['data']> => { // Send a raw http request to api.hypixel.net, and return the parsed json let response: typedHypixelApi.Requests[P]['response'] try { @@ -152,7 +152,7 @@ export let sendApiRequest = async<P extends keyof typedHypixelApi.Requests>(path await sleep(10000) return await sendApiRequest(path, options) } - return response + return response.data } // this is necessary for mocking in the tests because es6 |