Require attendee name AND number when adding.

This commit is contained in:
2021-02-18 23:39:00 +01:00
parent 1b12453df0
commit 1e6ec3d4c8

View File

@@ -34,7 +34,7 @@ const addAttendee = (req, res) => {
});
}
if (typeof attendee["name"] !== "string" && typeof attendee["phoneNumber"] !== "number") {
if (typeof attendee["name"] !== "string" || typeof attendee["phoneNumber"] !== "number") {
return res.status(400).send({
message: "Incorrect or missing attendee keys 'name' or 'phoneNumber'.",
success: false