separated groups and suppliers for material PUT and POST
This commit is contained in:
@ -70,6 +70,8 @@ export default class MaterialValidate { // validate input for material
|
||||
|
||||
static output (data) { // validate output and strip unwanted properties, returns null if not valid
|
||||
data = IdValidate.stringify(data);
|
||||
data.group = data.group_id.name;
|
||||
data.supplier = data.supplier_id.name;
|
||||
const {value, error} = Joi.object({
|
||||
_id: IdValidate.get(),
|
||||
name: this.material.name,
|
||||
|
Reference in New Issue
Block a user