From 9007c3504dd8962d13afe3ae3693c679aa067487 Mon Sep 17 00:00:00 2001 From: Tben Date: Fri, 7 Jul 2023 15:16:24 +0100 Subject: [PATCH] updates --- engine/db/add.js | 4 ++-- engine/db/test/add.js | 2 ++ package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/db/add.js b/engine/db/add.js index 6dd290d..feb99c2 100644 --- a/engine/db/add.js +++ b/engine/db/add.js @@ -8,7 +8,7 @@ const sanitizeHtml = require("sanitize-html"); const sanitizeHtmlOptions = require("../utils/sanitizeHtmlOptions"); /** - * add Function + * Add a db Entry Function * ============================================================================== * @description Description * @@ -103,7 +103,7 @@ module.exports = async function add({ dbFullName, tableName, data, tableSchema, value = JSON.stringify(value); } - insertValuesArray.push(dataValue); + insertValuesArray.push(value); } /** ********************************************** */ diff --git a/engine/db/test/add.js b/engine/db/test/add.js index a918d40..2ccfc81 100644 --- a/engine/db/test/add.js +++ b/engine/db/test/add.js @@ -16,6 +16,8 @@ const dbHandler = require("../dbHandler"); * @param {object} params.data - Data to be added * @param {string?} params.duplicateColumnName - Duplicate Column Name * @param {string | number?} params.duplicateColumnValue - Duplicate Column Value + * + * @returns {object} */ async function addDbEntry({ tableName, data, duplicateColumnName, duplicateColumnValue }) { /** diff --git a/package.json b/package.json index b261b7f..f73aca0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.62", + "version": "1.1.63", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": {