mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
added createSession and getSessionInfo
This commit is contained in:
parent
f01906d815
commit
4b48380a2f
4 changed files with 296 additions and 10 deletions
|
@ -21,6 +21,18 @@
|
|||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
|
||||
/**
|
||||
* Checks if the author exists
|
||||
*/
|
||||
exports.doesAuthorExists = function (authorID, callback)
|
||||
{
|
||||
//check if the database entry of this author exists
|
||||
db.get("globalAuthor:" + authorID, function (err, author)
|
||||
{
|
||||
callback(err, author != null);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the AuthorID for a token.
|
||||
* @param {String} token The token
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue