changed name of getMapped*4 functions to create*IfNotExistsFor
This commit is contained in:
parent
578f8db311
commit
dc15682a27
|
@ -31,7 +31,7 @@ var async = require("async");
|
||||||
/**********************/
|
/**********************/
|
||||||
|
|
||||||
exports.createGroup = groupManager.createGroup;
|
exports.createGroup = groupManager.createGroup;
|
||||||
exports.getMappedGroup4 = groupManager.getMappedGroup4;
|
exports.createGroupIfNotExistsFor = groupManager.createGroupIfNotExistsFor;
|
||||||
exports.deleteGroup = groupManager.deleteGroup;
|
exports.deleteGroup = groupManager.deleteGroup;
|
||||||
exports.listPads = groupManager.listPads;
|
exports.listPads = groupManager.listPads;
|
||||||
exports.createGroupPad = groupManager.createGroupPad;
|
exports.createGroupPad = groupManager.createGroupPad;
|
||||||
|
@ -41,7 +41,7 @@ exports.createGroupPad = groupManager.createGroupPad;
|
||||||
/**********************/
|
/**********************/
|
||||||
|
|
||||||
exports.createAuthor = authorManager.createAuthor;
|
exports.createAuthor = authorManager.createAuthor;
|
||||||
exports.getMappedAuthor4 = authorManager.getMappedAuthor4;
|
exports.createAuthorIfNotExistsFor = authorManager.createAuthorIfNotExistsFor;
|
||||||
|
|
||||||
/**********************/
|
/**********************/
|
||||||
/**SESSION FUNCTIONS***/
|
/**SESSION FUNCTIONS***/
|
||||||
|
|
|
@ -52,7 +52,7 @@ exports.getAuthor4Token = function (token, callback)
|
||||||
* @param {String} token The mapper
|
* @param {String} token The mapper
|
||||||
* @param {Function} callback callback (err, author)
|
* @param {Function} callback callback (err, author)
|
||||||
*/
|
*/
|
||||||
exports.getMappedAuthor4 = function (authorMapper, name, callback)
|
exports.createAuthorIfNotExistsFor = function (authorMapper, name, callback)
|
||||||
{
|
{
|
||||||
mapAuthorWithDBKey("mapper2author", authorMapper, function(err, author)
|
mapAuthorWithDBKey("mapper2author", authorMapper, function(err, author)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ exports.createGroup = function(callback)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getMappedGroup4 = function(groupMapper, callback)
|
exports.createGroupIfNotExistsFor = function(groupMapper, callback)
|
||||||
{
|
{
|
||||||
//ensure mapper is optional
|
//ensure mapper is optional
|
||||||
if(typeof groupMapper != "string")
|
if(typeof groupMapper != "string")
|
||||||
|
|
|
@ -36,13 +36,13 @@ catch(e)
|
||||||
//a list of all functions
|
//a list of all functions
|
||||||
var functions = {
|
var functions = {
|
||||||
"createGroup" : [],
|
"createGroup" : [],
|
||||||
"getMappedGroup4" : ["groupMapper"],
|
"createGroupIfNotExistsFor" : ["groupMapper"],
|
||||||
// "deleteGroup" : ["groupID"],
|
// "deleteGroup" : ["groupID"],
|
||||||
"listPads" : ["groupID"],
|
"listPads" : ["groupID"],
|
||||||
"createPad" : ["padID", "text"],
|
"createPad" : ["padID", "text"],
|
||||||
"createGroupPad" : ["groupID", "padName", "text"],
|
"createGroupPad" : ["groupID", "padName", "text"],
|
||||||
"createAuthor" : ["name"],
|
"createAuthor" : ["name"],
|
||||||
"getMappedAuthor4" : ["authorMapper" , "name"],
|
"createAuthorIfNotExistsFor" : ["authorMapper" , "name"],
|
||||||
"createSession" : ["groupID", "authorID", "validUntil"],
|
"createSession" : ["groupID", "authorID", "validUntil"],
|
||||||
// "deleteSession" : ["sessionID"],
|
// "deleteSession" : ["sessionID"],
|
||||||
"getSessionInfo" : ["sessionID"],
|
"getSessionInfo" : ["sessionID"],
|
||||||
|
|
|
@ -140,12 +140,12 @@
|
||||||
<div class="results"/>
|
<div class="results"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="define">createGroup()</div>
|
<div class="define">createGroup()</div>
|
||||||
<div class="define">createMappedGroup4(groupMapper)</div>
|
<div class="define">createGroupIfNotExistsFor(groupMapper)</div>
|
||||||
<div class="define">listPads(groupID)</div>
|
<div class="define">listPads(groupID)</div>
|
||||||
<div class="define">createPad(padID,text)</div>
|
<div class="define">createPad(padID,text)</div>
|
||||||
<div class="define">createGroupPad(groupID,padName,text)</div>
|
<div class="define">createGroupPad(groupID,padName,text)</div>
|
||||||
<div class="define">createAuthor(name)</div>
|
<div class="define">createAuthor(name)</div>
|
||||||
<div class="define">getMappedAuthor4(authorMapper,name)</div>
|
<div class="define">createAuthorIfNotExistsFor(authorMapper,name)</div>
|
||||||
<div class="define">createSession(groupID,authorID,validUntil)</div>
|
<div class="define">createSession(groupID,authorID,validUntil)</div>
|
||||||
<div class="define">deleteSession(sessionID)</div>
|
<div class="define">deleteSession(sessionID)</div>
|
||||||
<div class="define">getSessionInfo(sessionID)</div>
|
<div class="define">getSessionInfo(sessionID)</div>
|
||||||
|
|
Loading…
Reference in New Issue