add: field listen_channel m_device
This commit is contained in:
@@ -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
|
||||
};
|
||||
Reference in New Issue
Block a user