From bd507eb9ea50ebdfd4c9072ed069302d543fbb07 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Thu, 1 Jan 2026 09:50:07 +0100 Subject: [PATCH] Updates --- client/fetch/index.ts | 3 +-- dist/client/fetch/index.js | 4 +--- package.json | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/client/fetch/index.ts b/client/fetch/index.ts index e2a8763..9cc434a 100644 --- a/client/fetch/index.ts +++ b/client/fetch/index.ts @@ -48,8 +48,7 @@ export default async function fetchApi< let fetchData; let fetchOptions: RequestInit = {}; - if (options.method.match(/get/i) || !options.method) { - } else { + if (options.method.match(/post|put|delete|patch/i)) { if (options.body && typeof options.body === "object") { fetchOptions.body = JSON.stringify(options.body); } diff --git a/dist/client/fetch/index.js b/dist/client/fetch/index.js index e26694c..38254db 100644 --- a/dist/client/fetch/index.js +++ b/dist/client/fetch/index.js @@ -52,9 +52,7 @@ function fetchApi(url, options) { try { let fetchData; let fetchOptions = {}; - if (options.method.match(/get/i) || !options.method) { - } - else { + if (options.method.match(/post|put|delete|patch/i)) { if (options.body && typeof options.body === "object") { fetchOptions.body = JSON.stringify(options.body); } diff --git a/package.json b/package.json index 423f5b2..b00573a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/datasquirel", - "version": "5.7.11", + "version": "5.7.12", "description": "Cloud-based SQL data management tool", "main": "dist/index.js", "bin": {