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,