From 603fe4bf1777bdc3a402c95eb03f6ca7f66708b5 Mon Sep 17 00:00:00 2001 From: Tben Date: Thu, 27 Jul 2023 10:53:18 +0100 Subject: [PATCH] minor revision --- package.json | 2 +- utils/post.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ba21708..0ae9de0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.92", + "version": "1.1.93", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": { diff --git a/utils/post.js b/utils/post.js index c594a0b..28b5d80 100644 --- a/utils/post.js +++ b/utils/post.js @@ -41,10 +41,11 @@ const https = require("https"); * @param {string} params.key - FULL ACCESS API Key * @param {string} params.database - Database Name * @param {PostDataPayload | string} params.query - SQL query String or Request Object + * @param {any[]} [params.queryValues] - Query Values if using "?" placeholders * * @returns { Promise } - Return Object */ -async function post({ key, query, database }) { +async function post({ key, query, queryValues, database }) { /** * Make https request * @@ -53,6 +54,7 @@ async function post({ key, query, database }) { const httpResponse = await new Promise((resolve, reject) => { const reqPayloadString = JSON.stringify({ query, + queryValues, database, }).replace(/\n|\r|\n\r/gm, "");