biolab-unige / xtens-app

A digital repository for biomedical data based on a flexible JSON data model ( The project has been moved to a new address https://github.com/xtens-suite/xtens-app.git )
http://www.xtens.org
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Edit Video when press button save, popup Error validation #8

Closed gicaz closed 8 years ago

gicaz commented 8 years ago

"details" is not allowed

PUT http://10.116.13.60:1337/data/3 400 (Bad Request)send @ jquery.js:9664 undefined utils.js:24

gicaz commented 8 years ago

Only with datatype video

gicaz commented 8 years ago

sails console : Error: ValidationError: child "files" fails because ["files" at position 0 fails because ["details" is not allowed, "id" is not allowed, "createdAt" is not allowed, "updatedAt" is not allowed]]

gicaz commented 8 years ago

Create and delete video work.

gicaz commented 8 years ago

Solved

gicaz commented 8 years ago

Added to DataService and SampleService, in files validation

details: Joi.object().allow(null) id: Joi.number().integer().positive() createdAt: Joi.date() updateAt: Joi.date()