db/AuthorManager: early return, no functional changes

This commit is contained in:
muxator 2018-08-29 02:28:40 +02:00
parent 2b8646a855
commit 61823e7689

View file

@ -209,20 +209,19 @@ exports.listPadsOfAuthor = function (authorID, callback)
if(author == null) if(author == null)
{ {
callback(new customError("authorID does not exist","apierror")) callback(new customError("authorID does not exist","apierror"))
return;
} }
//everything is fine, return the pad IDs //everything is fine, return the pad IDs
else var pads = [];
if(author.padIDs != null)
{ {
var pads = []; for (var padId in author.padIDs)
if(author.padIDs != null)
{ {
for (var padId in author.padIDs) pads.push(padId);
{
pads.push(padId);
}
} }
callback(null, {padIDs: pads});
} }
callback(null, {padIDs: pads});
}); });
} }