@ventlio/tanstack-query 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -83,7 +83,7 @@ async function makeRequest({ body, method = HttpMethod.GET, path, bearerToken, i
83
83
  data: body,
84
84
  });
85
85
  // get response json
86
- const jsonResp = await resp.data();
86
+ const jsonResp = await resp.data;
87
87
  // get response code
88
88
  const responseCode = resp.status;
89
89
  if (responseCode > 299) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { UseQueryOptions } from '@tanstack/react-query';
3
2
  import type { IRequestError, IRequestSuccess } from '../request';
4
3
  import type { TanstackQueryOption } from './queries.interface';
@@ -24,7 +24,7 @@ async function makeRequest({ body, method = request_enum.HttpMethod.GET, path, b
24
24
  data: body,
25
25
  });
26
26
  // get response json
27
- const jsonResp = await resp.data();
27
+ const jsonResp = await resp.data;
28
28
  // get response code
29
29
  const responseCode = resp.status;
30
30
  if (responseCode > 299) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -36,7 +36,7 @@ export async function makeRequest<TResponse>({
36
36
  });
37
37
 
38
38
  // get response json
39
- const jsonResp: any = await resp.data();
39
+ const jsonResp: any = await resp.data;
40
40
 
41
41
  // get response code
42
42
  const responseCode = resp.status;