From ee7bc45412c9b50680255b04c2eea86f7c647938 Mon Sep 17 00:00:00 2001 From: Tben <52448020+BenjaminToby@users.noreply.github.com> Date: Mon, 22 May 2023 11:52:27 +0100 Subject: [PATCH] updates --- package.json | 2 +- users/add-user.js | 2 +- users/update-user.js | 2 +- utils/upload-image.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d1aa3d4..b87dc70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.20", + "version": "1.1.21", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": { diff --git a/users/add-user.js b/users/add-user.js index 4476bc8..7b07aa9 100644 --- a/users/add-user.js +++ b/users/add-user.js @@ -49,7 +49,7 @@ module.exports = async function ({ key, payload, database }) { method: "POST", headers: { "Content-Type": "application/json", - "Content-Length": reqPayload.length, + "Content-Length": Buffer.from(reqPayload).length, Authorization: key, }, port: 443, diff --git a/users/update-user.js b/users/update-user.js index 1eb244e..2bc6edd 100644 --- a/users/update-user.js +++ b/users/update-user.js @@ -49,7 +49,7 @@ module.exports = async function ({ key, payload, database }) { method: "POST", headers: { "Content-Type": "application/json", - "Content-Length": reqPayload.length, + "Content-Length": Buffer.from(reqPayload).length, Authorization: key, }, port: 443, diff --git a/utils/upload-image.js b/utils/upload-image.js index d006f17..53160ba 100644 --- a/utils/upload-image.js +++ b/utils/upload-image.js @@ -53,7 +53,7 @@ module.exports = async function ({ key, payload }) { method: "POST", headers: { "Content-Type": "application/json", - "Content-Length": reqPayload.length, + "Content-Length": Buffer.from(reqPayload).length, Authorization: key, }, port: 443,