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, "");