From 1853ac46770fb74c4ce1bf9a0709360639179690 Mon Sep 17 00:00:00 2001 From: pulipakaa24 Date: Mon, 5 Jan 2026 16:59:00 -0600 Subject: [PATCH] reinstate >=2 limit for group creation --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 64c19df..ab8de19 100644 --- a/index.js +++ b/index.js @@ -1151,9 +1151,8 @@ app.post('/add_group', authenticateToken, async (req, res) => { if (!name || !name.trim()) { return res.status(400).json({ error: 'Group name is required' }); } - // if (!peripheral_ids || !Array.isArray(peripheral_ids) || peripheral_ids.length < 2) { - if (!peripheral_ids || !Array.isArray(peripheral_ids)) { + if (!peripheral_ids || !Array.isArray(peripheral_ids) || peripheral_ids.length < 2) { return res.status(400).json({ error: 'At least 2 peripherals are required' }); }