Fix up notification tests

This commit is contained in:
Johannes Zellner
2019-01-21 08:51:04 +01:00
parent 4b7090cf7c
commit 8cc07e51bf
3 changed files with 24 additions and 3 deletions
+1
View File
@@ -68,6 +68,7 @@ function add(userId, eventId, title, message, action, callback) {
message: message,
action: action
}, function (error, result) {
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(new NotificationsError(NotificationsError.NOT_FOUND, error.message));
if (error) return callback(new NotificationsError(NotificationsError.INTERNAL_ERROR, error));
callback(null, { id: result });