added createSession and getSessionInfo

This commit is contained in:
Peter 'Pita' Martischka 2011-08-09 16:45:49 +01:00
parent f01906d815
commit 4b48380a2f
4 changed files with 296 additions and 10 deletions

View file

@ -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