From 096fe9461def9e96b1763150f0a3dfb88a90fd73 Mon Sep 17 00:00:00 2001 From: Antony Kurniawan Date: Thu, 4 Dec 2025 15:37:48 +0700 Subject: [PATCH] add: field listen_channel m_device --- validate/device.schema.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/validate/device.schema.js b/validate/device.schema.js index c054b02..c7182cb 100644 --- a/validate/device.schema.js +++ b/validate/device.schema.js @@ -15,7 +15,8 @@ const insertDeviceSchema = Joi.object({ .required() .messages({ 'string.ip': 'IP address must be a valid IPv4 or IPv6 address' - }) + }), + listen_channel: Joi.string().max(100).required() }); const updateDeviceSchema = Joi.object({ @@ -28,11 +29,11 @@ const updateDeviceSchema = Joi.object({ .ip({ version: ['ipv4', 'ipv6'] }) .messages({ 'string.ip': 'IP address must be a valid IPv4 or IPv6 address' - }) + }), + listen_channel: Joi.string().max(100) }).min(1); -// ✅ Export dengan CommonJS module.exports = { insertDeviceSchema, updateDeviceSchema }; \ No newline at end of file