From d88f16c7fbbc2d06a37dce27fa527981e00f8742 Mon Sep 17 00:00:00 2001 From: Tben <52448020+BenjaminToby@users.noreply.github.com> Date: Tue, 23 May 2023 12:16:10 +0100 Subject: [PATCH] updates --- package.json | 2 +- users/add-user.js | 8 +++++++- users/update-user.js | 2 +- users/user-auth.js | 11 ++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b87dc70..c82f24f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.21", + "version": "1.1.22", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": { diff --git a/users/add-user.js b/users/add-user.js index 7b07aa9..9e643d4 100644 --- a/users/add-user.js +++ b/users/add-user.js @@ -26,8 +26,14 @@ const https = require("https"); * * @param {{ * key: string, - * payload: string, * database: string + * payload: { + * first_name: string, + * last_name: string, + * user_name: string, + * email: string, + * password: string, + * }, * }} * * @returns { Promise } diff --git a/users/update-user.js b/users/update-user.js index 2bc6edd..eceb8a6 100644 --- a/users/update-user.js +++ b/users/update-user.js @@ -28,7 +28,7 @@ const https = require("https"); * @param {String} params.key - API Key * @param {String} params.database - Target Database * @param {String | Object} [params.payload={ id: 4, first_name: "Benjamin" }] - User Object. - * @param {number} [params.payload.id] - User id => Required + * @param {number} params.payload.id - User id => Required * * @returns { Promise} */ diff --git a/users/user-auth.js b/users/user-auth.js index 0e614ea..4b3b472 100644 --- a/users/user-auth.js +++ b/users/user-auth.js @@ -16,11 +16,12 @@ const decrypt = require("../functions/decrypt"); * ============================================================================== * Main Function * ============================================================================== - * @param {Object} request - Http request object - * @param {String} encryptionKey - Encryption Key - * @param {String} encryptionSalt - Encryption Salt - * @param {String} level - Optional. "Deep" value indicates an extra layer of security - * @param {String} database - Database Name + * @param {Object} params - Arg + * @param {Object} params.request - Http request object + * @param {String} params.encryptionKey - Encryption Key + * @param {String} params.encryptionSalt - Encryption Salt + * @param {String} params.level - Optional. "Deep" value indicates an extra layer of security + * @param {String} params.database - Database Name */ module.exports = function ({ request, encryptionKey, encryptionSalt, level, database }) { try {