wisdom #19

Merged
bragaz_rexita merged 38 commits from wisdom into main 2025-12-22 09:18:18 +00:00
Showing only changes of commit 096fe9461d - Show all commits

View File

@@ -15,7 +15,8 @@ const insertDeviceSchema = Joi.object({
.required() .required()
.messages({ .messages({
'string.ip': 'IP address must be a valid IPv4 or IPv6 address' 'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
}) }),
listen_channel: Joi.string().max(100).required()
}); });
const updateDeviceSchema = Joi.object({ const updateDeviceSchema = Joi.object({
@@ -28,11 +29,11 @@ const updateDeviceSchema = Joi.object({
.ip({ version: ['ipv4', 'ipv6'] }) .ip({ version: ['ipv4', 'ipv6'] })
.messages({ .messages({
'string.ip': 'IP address must be a valid IPv4 or IPv6 address' 'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
}) }),
listen_channel: Joi.string().max(100)
}).min(1); }).min(1);
// ✅ Export dengan CommonJS
module.exports = { module.exports = {
insertDeviceSchema, updateDeviceSchema insertDeviceSchema, updateDeviceSchema
}; };