add: validate is_active
This commit is contained in:
@@ -11,6 +11,7 @@ const insertTagsSchema = Joi.object({
|
|||||||
is_active: Joi.boolean().required(),
|
is_active: Joi.boolean().required(),
|
||||||
data_type: Joi.string().max(50).required(),
|
data_type: Joi.string().max(50).required(),
|
||||||
unit: Joi.string().max(50).required(),
|
unit: Joi.string().max(50).required(),
|
||||||
|
is_alarm: Joi.boolean().required()
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateTagsSchema = Joi.object({
|
const updateTagsSchema = Joi.object({
|
||||||
@@ -20,6 +21,7 @@ const updateTagsSchema = Joi.object({
|
|||||||
is_active: Joi.boolean(),
|
is_active: Joi.boolean(),
|
||||||
data_type: Joi.string().max(50),
|
data_type: Joi.string().max(50),
|
||||||
unit: Joi.string().max(50),
|
unit: Joi.string().max(50),
|
||||||
|
is_alarm: Joi.boolean().optional()
|
||||||
}).min(1);
|
}).min(1);
|
||||||
|
|
||||||
// ✅ Export dengan CommonJS
|
// ✅ Export dengan CommonJS
|
||||||
|
|||||||
Reference in New Issue
Block a user