db/AuthorManager: early return, no functional changes
This commit is contained in:
parent
2b8646a855
commit
61823e7689
1 changed files with 7 additions and 8 deletions
|
@ -209,20 +209,19 @@ exports.listPadsOfAuthor = function (authorID, callback)
|
|||
if(author == null)
|
||||
{
|
||||
callback(new customError("authorID does not exist","apierror"))
|
||||
return;
|
||||
}
|
||||
|
||||
//everything is fine, return the pad IDs
|
||||
else
|
||||
var pads = [];
|
||||
if(author.padIDs != null)
|
||||
{
|
||||
var pads = [];
|
||||
if(author.padIDs != null)
|
||||
for (var padId in author.padIDs)
|
||||
{
|
||||
for (var padId in author.padIDs)
|
||||
{
|
||||
pads.push(padId);
|
||||
}
|
||||
pads.push(padId);
|
||||
}
|
||||
callback(null, {padIDs: pads});
|
||||
}
|
||||
callback(null, {padIDs: pads});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue