mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-08 03:02:03 +01:00
db/GroupManager: move inner function on top. No functional change
This is to make easier on the eye the next change.
This commit is contained in:
parent
6af419a88e
commit
c85bcf0614
1 changed files with 13 additions and 13 deletions
|
@ -213,6 +213,18 @@ exports.createGroupIfNotExistsFor = function(groupMapper, callback)
|
||||||
//try to get a group for this mapper
|
//try to get a group for this mapper
|
||||||
db.get("mapper2group:"+groupMapper, function(err, groupID)
|
db.get("mapper2group:"+groupMapper, function(err, groupID)
|
||||||
{
|
{
|
||||||
|
function createGroupForMapper(cb) {
|
||||||
|
exports.createGroup(function(err, responseObj)
|
||||||
|
{
|
||||||
|
if(ERR(err, cb)) return;
|
||||||
|
|
||||||
|
//create the mapper entry for this group
|
||||||
|
db.set("mapper2group:"+groupMapper, responseObj.groupID);
|
||||||
|
|
||||||
|
cb(null, responseObj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
|
|
||||||
// there is a group for this mapper
|
// there is a group for this mapper
|
||||||
|
@ -229,18 +241,6 @@ exports.createGroupIfNotExistsFor = function(groupMapper, callback)
|
||||||
else {
|
else {
|
||||||
createGroupForMapper(callback)
|
createGroupForMapper(callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
function createGroupForMapper(cb) {
|
|
||||||
exports.createGroup(function(err, responseObj)
|
|
||||||
{
|
|
||||||
if(ERR(err, cb)) return;
|
|
||||||
|
|
||||||
//create the mapper entry for this group
|
|
||||||
db.set("mapper2group:"+groupMapper, responseObj.groupID);
|
|
||||||
|
|
||||||
cb(null, responseObj);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue