mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
Update src/node/db/AuthorManager.js
This commit is contained in:
parent
40a7b43799
commit
21dcce2296
1 changed files with 19 additions and 0 deletions
|
@ -141,6 +141,25 @@ exports.getAuthor = function (author, callback)
|
|||
db.get("globalAuthor:" + author, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Author Name of the author
|
||||
* @param {String} author The id of the author
|
||||
* @param {Function} callback callback(err, name)
|
||||
*/
|
||||
|
||||
exports.getAuthorName = function (authorID, callback)
|
||||
{
|
||||
db.getSub("globalAuthor:" + author, ["name"], callback);
|
||||
console.log(authorID);
|
||||
db.getSub("globalAuthor:" + authorID, ["name"], function(err, authorName){
|
||||
if(ERR(err, callback)) return;
|
||||
console.log(authorName);
|
||||
callback(null, {authorName: authorName});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the color Id of the author
|
||||
* @param {String} author The id of the author
|
||||
|
|
Loading…
Reference in a new issue