This commit is contained in:
Tben 2023-05-23 12:16:10 +01:00
parent ee7bc45412
commit d88f16c7fb
4 changed files with 15 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "datasquirel", "name": "datasquirel",
"version": "1.1.21", "version": "1.1.22",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -26,8 +26,14 @@ const https = require("https");
* *
* @param {{ * @param {{
* key: string, * key: string,
* payload: string,
* database: string * database: string
* payload: {
* first_name: string,
* last_name: string,
* user_name: string,
* email: string,
* password: string,
* },
* }} * }}
* *
* @returns { Promise<FunctionReturn> } * @returns { Promise<FunctionReturn> }

View File

@ -28,7 +28,7 @@ const https = require("https");
* @param {String} params.key - API Key * @param {String} params.key - API Key
* @param {String} params.database - Target Database * @param {String} params.database - Target Database
* @param {String | Object} [params.payload={ id: 4, first_name: "Benjamin" }] - User Object. * @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<FunctionReturn>} * @returns { Promise<FunctionReturn>}
*/ */

View File

@ -16,11 +16,12 @@ const decrypt = require("../functions/decrypt");
* ============================================================================== * ==============================================================================
* Main Function * Main Function
* ============================================================================== * ==============================================================================
* @param {Object} request - Http request object * @param {Object} params - Arg
* @param {String} encryptionKey - Encryption Key * @param {Object} params.request - Http request object
* @param {String} encryptionSalt - Encryption Salt * @param {String} params.encryptionKey - Encryption Key
* @param {String} level - Optional. "Deep" value indicates an extra layer of security * @param {String} params.encryptionSalt - Encryption Salt
* @param {String} database - Database Name * @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 }) { module.exports = function ({ request, encryptionKey, encryptionSalt, level, database }) {
try { try {