wisdom #45
@@ -16,7 +16,9 @@ const insertDeviceSchema = Joi.object({
|
||||
.messages({
|
||||
'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
|
||||
}),
|
||||
listen_channel: Joi.string().max(100).required()
|
||||
listen_channel: Joi.string().max(100).required(),
|
||||
listen_channel_reminder: Joi.string().max(100).optional(),
|
||||
reminder_at: Joi.date().iso().allow(null).optional()
|
||||
});
|
||||
|
||||
const updateDeviceSchema = Joi.object({
|
||||
@@ -30,7 +32,10 @@ const updateDeviceSchema = Joi.object({
|
||||
.messages({
|
||||
'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
|
||||
}),
|
||||
listen_channel: Joi.string().max(100)
|
||||
listen_channel: Joi.string().max(100),
|
||||
listen_channel_reminder: Joi.string().max(100).optional(),
|
||||
reminder_at: Joi.date().iso().allow(null).optional()
|
||||
|
||||
}).min(1);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user