This commit is contained in:
Tben 2023-05-23 15:06:59 +01:00
parent 4530132ffa
commit 1cc3d50cdc
3 changed files with 28 additions and 2 deletions

View File

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

View File

@ -55,7 +55,7 @@ const userAuth = require("./user-auth");
* @param {String} params.encryptionKey - Encryption Key * @param {String} params.encryptionKey - Encryption Key
* @param {String} params.encryptionSalt - Encryption Salt * @param {String} params.encryptionSalt - Encryption Salt
* *
* @returns { Promise<FunctionReturn>} * @returns { Promise<FunctionReturn> }
*/ */
module.exports = async function ({ key, database, response, request, level, encryptionKey, encryptionSalt }) { module.exports = async function ({ key, database, response, request, level, encryptionKey, encryptionSalt }) {
/** /**

View File

@ -12,6 +12,30 @@ const decrypt = require("../functions/decrypt");
/** ****************************************************************************** */ /** ****************************************************************************** */
/** ****************************************************************************** */ /** ****************************************************************************** */
/**
* @typedef {object} FunctionReturn
* @property {boolean} success - Did the function run successfully?
* @property {{
* id: number,
* first_name: string,
* last_name: string,
* username: string,
* email: string,
* phone: string,
* social_id: [string],
* image: string,
* image_thumbnail: string,
* verification_status: [number=0],
* social_login: [number],
* social_platform: [string],
* csrf_k: string,
* more_data: [string],
* logged_in_status: boolean,
* date: string,
* }} payload - Payload
* @property {string} [msg] - Response Message
*/
/** /**
* ============================================================================== * ==============================================================================
* Main Function * Main Function
@ -22,6 +46,8 @@ const decrypt = require("../functions/decrypt");
* @param {String} params.encryptionSalt - Encryption Salt * @param {String} params.encryptionSalt - Encryption Salt
* @param {String} params.level - Optional. "Deep" value indicates an extra layer of security * @param {String} params.level - Optional. "Deep" value indicates an extra layer of security
* @param {String} params.database - Database Name * @param {String} params.database - Database Name
*
* @returns { FunctionReturn }
*/ */
module.exports = function ({ request, encryptionKey, encryptionSalt, level, database }) { module.exports = function ({ request, encryptionKey, encryptionSalt, level, database }) {
try { try {