diff --git a/package.json b/package.json index f704185..0b4c64c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasquirel", - "version": "1.1.28", + "version": "1.1.29", "description": "Cloud-based SQL data management tool", "main": "index.js", "scripts": { diff --git a/users/reauth-user.js b/users/reauth-user.js index 54b8bfc..b72ac7e 100644 --- a/users/reauth-user.js +++ b/users/reauth-user.js @@ -55,7 +55,7 @@ const userAuth = require("./user-auth"); * @param {String} params.encryptionKey - Encryption Key * @param {String} params.encryptionSalt - Encryption Salt * - * @returns { Promise} + * @returns { Promise } */ module.exports = async function ({ key, database, response, request, level, encryptionKey, encryptionSalt }) { /** diff --git a/users/user-auth.js b/users/user-auth.js index 4b3b472..3c63515 100644 --- a/users/user-auth.js +++ b/users/user-auth.js @@ -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 @@ -22,6 +46,8 @@ const decrypt = require("../functions/decrypt"); * @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 + * + * @returns { FunctionReturn } */ module.exports = function ({ request, encryptionKey, encryptionSalt, level, database }) { try {