Skip to content

Commit

Permalink
Address linter
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSBrown committed Jan 9, 2025
1 parent 2ac3869 commit 32ca96e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/database/foxx/api/authz.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Check failure on line 17 in core/database/foxx/api/authz.js

View workflow job for this annotation

GitHub Actions / lint-javascript

There must be no indentation
Expand Down
10 changes: 6 additions & 4 deletions core/database/foxx/api/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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() {
//{
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions core/database/foxx/api/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -1061,12 +1061,13 @@ module.exports = (function () {
* :
* "email" : "[email protected]"
*
*
* @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;
Expand Down Expand Up @@ -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.

Check failure on line 3192 in core/database/foxx/api/support.js

View workflow job for this annotation

GitHub Actions / lint-javascript

Missing JSDoc @param "token_type" type
*

Check failure on line 3193 in core/database/foxx/api/support.js

View workflow job for this annotation

GitHub Actions / lint-javascript

There must be no indentation
* @param other_token_data {string}

Check failure on line 3194 in core/database/foxx/api/support.js

View workflow job for this annotation

GitHub Actions / lint-javascript

Missing JSDoc @param "other_token_data" type
*
* String of additional token data, delimited by the '|' character.
* The format is determined by the token type.
* Currently expecting the following formats:
Expand Down

0 comments on commit 32ca96e

Please sign in to comment.