diff --git a/core/database/foxx/api/authz.js b/core/database/foxx/api/authz.js index be07fb5ba..adbece765 100644 --- a/core/database/foxx/api/authz.js +++ b/core/database/foxx/api/authz.js @@ -10,8 +10,8 @@ module.exports = (function () { /** * Checks if a client has the required permissions on a record. * - * @param {string} a_data_key - A DataFed key associated with a record (not prepended with 'd/'). * @param {object} a_client - A user document representing the client being verified. + * @param {string} a_data_key - A DataFed key associated with a record (not prepended with 'd/'). * The client object should have the following structure: * { * "_key": "bob", diff --git a/core/database/foxx/api/record.js b/core/database/foxx/api/record.js index 9e047907d..3ac2b7fbb 100644 --- a/core/database/foxx/api/record.js +++ b/core/database/foxx/api/record.js @@ -73,6 +73,8 @@ class Record { /** * Compares two paths and if an error is detected will save the error code and message. * + * @param {string} storedPath - the path stored in the database + * @param {string} inputPath - the path being checked * @returns {boolean} - true if paths are equal false otherwise **/ _comparePaths(storedPath, inputPath) { @@ -91,7 +93,7 @@ class Record { /** * Checks if the record exists in the database. * - * @return {boolean} True if the record exists, otherwise false. + * @returns {boolean} - True if the record exists, otherwise false. */ exists() { return this.#exists; @@ -114,7 +116,7 @@ class Record { /** * Retrieves the error code of the last run method. * - * @return {string|null} Error code or null if no error. + * @returns {string|null} Error code or null if no error. */ errorMessage() { return this.#err_msg; @@ -123,7 +125,7 @@ class Record { /** * Checks if the record is managed by DataFed. * - * @return {boolean} True if managed, otherwise false. + * @returns {boolean} True if managed, otherwise false. */ isManaged() { //{ @@ -154,7 +156,7 @@ class Record { * Validates if the provided record path is consistent with the database. * * @param {string} a_path - The path to validate. - * @return {boolean} True if consistent, otherwise false. + * @returns {boolean} True if consistent, otherwise false. */ isPathConsistent(a_path) { // This function will populate the this.#loc member and the this.#alloc diff --git a/core/database/foxx/api/support.js b/core/database/foxx/api/support.js index 100dd9543..d62945114 100644 --- a/core/database/foxx/api/support.js +++ b/core/database/foxx/api/support.js @@ -1061,12 +1061,13 @@ module.exports = (function () { * : * "email" : "bobjones@gmail.com" * - * * @param {string} a_object_id - the identity of a record or collection or project * * "d/fdakjfla" * "p/big_thing" * "c/my_collection" + * + * @returns {boolean} - if client has admin rights on the object. **/ obj.hasAdminPermObject = function (a_client, a_object_id) { if (a_client.is_admin) return true; @@ -3188,9 +3189,10 @@ module.exports = (function () { }; /** - * - * @param token_type {object.AccessTokenType} Type to determine parse logic. + * @param token_type {integer} - Type to determine parse logic. + * * @param other_token_data {string} + * * String of additional token data, delimited by the '|' character. * The format is determined by the token type. * Currently expecting the following formats: