@lasterp/shared 1.0.0-beta.15 → 1.0.0-beta.16

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.cjs CHANGED
@@ -235,12 +235,15 @@ var useFrappeGetCall = (method, params, options, type = "GET") => {
235
235
  const queryKey = ["frappeCall", type, method, url];
236
236
  const { data, error, isLoading, isFetching, refetch } = import_react_query2.useQuery({
237
237
  queryKey,
238
- queryFn: type === "GET" ? async () => {
239
- const response = await call.get(method, params);
240
- return response.message;
241
- } : async () => {
242
- const response = await call.post(method, params);
243
- return response.message;
238
+ queryFn: async () => {
239
+ if (type === "GET") {
240
+ const response = await call.get(method, params);
241
+ console.log("Response", response);
242
+ return response.message;
243
+ } else {
244
+ const response = await call.post(method, params);
245
+ return response.message;
246
+ }
244
247
  },
245
248
  enabled: (options?.enabled ?? true) && !!method,
246
249
  staleTime: options?.staleTime,
package/dist/index.js CHANGED
@@ -161,12 +161,15 @@ var useFrappeGetCall = (method, params, options, type = "GET") => {
161
161
  const queryKey = ["frappeCall", type, method, url];
162
162
  const { data, error, isLoading, isFetching, refetch } = useQuery2({
163
163
  queryKey,
164
- queryFn: type === "GET" ? async () => {
165
- const response = await call.get(method, params);
166
- return response.message;
167
- } : async () => {
168
- const response = await call.post(method, params);
169
- return response.message;
164
+ queryFn: async () => {
165
+ if (type === "GET") {
166
+ const response = await call.get(method, params);
167
+ console.log("Response", response);
168
+ return response.message;
169
+ } else {
170
+ const response = await call.post(method, params);
171
+ return response.message;
172
+ }
170
173
  },
171
174
  enabled: (options?.enabled ?? true) && !!method,
172
175
  staleTime: options?.staleTime,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lasterp/shared",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.16",
4
4
  "description": "Shared repo for webapp and native app",
5
5
  "license": "MIT",
6
6
  "files": [