Do not return an error on mailinglist listing if none exists

We usually return the empty array, to avoid the need for specific error
handling
This commit is contained in:
Johannes Zellner
2018-04-01 21:51:54 +02:00
parent e364661813
commit 045ea4681a

View File

@@ -146,7 +146,6 @@ function listGroups(domain, callback) {
database.query('SELECT ' + MAILBOX_FIELDS + ' FROM mailboxes WHERE domain = ? AND ownerType = ? AND aliasTarget IS NULL', [ domain, exports.TYPE_GROUP ], function (error, results) {
if (error) return callback(new DatabaseError(DatabaseError.INTERNAL_ERROR, error));
if (results.length === 0) return callback(new DatabaseError(DatabaseError.NOT_FOUND));
callback(null, results);
});