forked from DebaucheryLibrarian/traxxx
Fixed back-end alert verification.
This commit is contained in:
parent
7808ce452f
commit
db1b72f95f
|
@ -11,7 +11,7 @@ async function addAlert(alert, sessionUser) {
|
|||
throw new HttpError('You are not authenthicated', 401);
|
||||
}
|
||||
|
||||
if (!alert.actors?.length > 0 && !alert.tags?.length > 0 && !alert.entity && !alert.matches?.length > 0) {
|
||||
if ((!alert.actors || alert.actors.length === 0) && (!alert.tags || alert.tags.length === 0) && (!alert.entities || alert.entities.length === 0) && (!alert.matches || alert.matches.length === 0)) {
|
||||
throw new HttpError('Alert must contain at least one actor, tag or entity', 400);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue