added GET /sample/number/{number} route
This commit is contained in:
@ -70,13 +70,14 @@ export default class SampleValidate {
|
||||
private static fieldKeys = [
|
||||
...SampleValidate.sortKeys,
|
||||
'condition',
|
||||
'notes',
|
||||
'material_id',
|
||||
'material',
|
||||
'note_id',
|
||||
'user_id',
|
||||
'material._id',
|
||||
'material.numbers',
|
||||
'measurements.spectrum.dpt'
|
||||
'measurements.spectrum.dpt',
|
||||
];
|
||||
|
||||
static input (data, param) { // validate input, set param to 'new' to make all attributes required
|
||||
@ -134,6 +135,7 @@ export default class SampleValidate {
|
||||
material_id: IdValidate.get(),
|
||||
material: MaterialValidate.outputV().append({number: Joi.string().max(128).allow('')}),
|
||||
note_id: IdValidate.get().allow(null),
|
||||
notes: this.sample.notes,
|
||||
user_id: IdValidate.get(),
|
||||
added: this.sample.added
|
||||
};
|
||||
|
Reference in New Issue
Block a user