From 59612b1d96be2cc32545d7fd76ed0b9530db29bd Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Fri, 18 Jun 2021 12:06:09 +0200 Subject: [PATCH] AuthorManager: normalize authorid parameter name --- src/node/db/AuthorManager.js | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/node/db/AuthorManager.js b/src/node/db/AuthorManager.js index 2a354d425..40e0e0e85 100644 --- a/src/node/db/AuthorManager.js +++ b/src/node/db/AuthorManager.js @@ -181,41 +181,42 @@ exports.createAuthor = async (name) => { /** * Returns the Author Obj of the author - * @param {String} author The id of the author + * @param {String} authorID The id of the author */ -exports.getAuthor = async (author) => await db.get(`globalAuthor:${author}`); +exports.getAuthor = async (authorID) => await db.get(`globalAuthor:${authorID}`); /** * Returns the color Id of the author - * @param {String} author The id of the author + * @param {String} authorID The id of the author */ -exports.getAuthorColorId = async (author) => await db.getSub(`globalAuthor:${author}`, ['colorId']); +exports.getAuthorColorId = async (authorID) => await db.getSub( + `globalAuthor:${authorID}`, ['colorId']); /** * Sets the color Id of the author - * @param {String} author The id of the author + * @param {String} authorID The id of the author * @param {String} colorId The color id of the author */ -exports.setAuthorColorId = async (author, colorId) => await db.setSub( - `globalAuthor:${author}`, ['colorId'], colorId); +exports.setAuthorColorId = async (authorID, colorId) => await db.setSub( + `globalAuthor:${authorID}`, ['colorId'], colorId); /** * Returns the name of the author - * @param {String} author The id of the author + * @param {String} authorID The id of the author */ -exports.getAuthorName = async (author) => await db.getSub(`globalAuthor:${author}`, ['name']); +exports.getAuthorName = async (authorID) => await db.getSub(`globalAuthor:${authorID}`, ['name']); /** * Sets the name of the author - * @param {String} author The id of the author + * @param {String} authorID The id of the author * @param {String} name The name of the author */ -exports.setAuthorName = async (author, name) => await db.setSub( - `globalAuthor:${author}`, ['name'], name); +exports.setAuthorName = async (authorID, name) => await db.setSub( + `globalAuthor:${authorID}`, ['name'], name); /** * Returns an array of all pads this author contributed to - * @param {String} author The id of the author + * @param {String} authorID The id of the author */ exports.listPadsOfAuthor = async (authorID) => { /* There are two other places where this array is manipulated: @@ -239,7 +240,7 @@ exports.listPadsOfAuthor = async (authorID) => { /** * Adds a new pad to the list of contributions - * @param {String} author The id of the author + * @param {String} authorID The id of the author * @param {String} padID The id of the pad the author contributes to */ exports.addPad = async (authorID, padID) => { @@ -266,7 +267,7 @@ exports.addPad = async (authorID, padID) => { /** * Removes a pad from the list of contributions - * @param {String} author The id of the author + * @param {String} authorID The id of the author * @param {String} padID The id of the pad the author contributes to */ exports.removePad = async (authorID, padID) => {