feat: enhance sparepart database queries and sparepart number validation
This commit is contained in:
@@ -17,8 +17,8 @@ const insertDeviceSchema = Joi.object({
|
||||
'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
|
||||
}),
|
||||
listen_channel: Joi.string().max(100).required(),
|
||||
listen_channel_reminder: Joi.string().max(100).optional(),
|
||||
reminder_at: Joi.date().iso().allow(null).optional()
|
||||
listen_channel_reminder: Joi.string().max(100).allow('', null),
|
||||
reminder_at: Joi.date().iso().allow('', null),
|
||||
});
|
||||
|
||||
const updateDeviceSchema = Joi.object({
|
||||
@@ -33,8 +33,8 @@ const updateDeviceSchema = Joi.object({
|
||||
'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
|
||||
}),
|
||||
listen_channel: Joi.string().max(100),
|
||||
listen_channel_reminder: Joi.string().max(100).optional(),
|
||||
reminder_at: Joi.date().iso().allow(null).optional()
|
||||
listen_channel_reminder: Joi.string().max(100).allow('', null),
|
||||
reminder_at: Joi.date().iso().allow('', null),
|
||||
|
||||
}).min(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user