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/hypixel.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/hypixel.ts')
-rw-r--r-- | src/hypixel.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hypixel.ts b/src/hypixel.ts index 80c73b1..c72e397 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -64,13 +64,13 @@ const cleanResponseFunctions = { async function cleanResponse<P extends keyof typeof cleanResponseFunctions>( path: P, - data: typedHypixelApi.Requests[P]['response'], + data: typedHypixelApi.Requests[P]['response']['data'], options: ApiOptions ): Promise<Awaited<ReturnType<typeof cleanResponseFunctions[P]>>> { // Cleans up an api response const cleaningFunction: typeof cleanResponseFunctions[P] = cleanResponseFunctions[path] // we do `as any` because typescript unfortunately doesn't know which path it is - const cleanedData = await cleaningFunction(data.data as any, options) + const cleanedData = await cleaningFunction(data as any, options) return cleanedData as Awaited<ReturnType<typeof cleanResponseFunctions[P]>> } |