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

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,16 @@ 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
+ console.log("Response", response);
246
+ return response.message;
247
+ }
244
248
  },
245
249
  enabled: (options?.enabled ?? true) && !!method,
246
250
  staleTime: options?.staleTime,
package/dist/index.js CHANGED
@@ -161,12 +161,16 @@ 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
+ console.log("Response", response);
172
+ return response.message;
173
+ }
170
174
  },
171
175
  enabled: (options?.enabled ?? true) && !!method,
172
176
  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.17",
4
4
  "description": "Shared repo for webapp and native app",
5
5
  "license": "MIT",
6
6
  "files": [