|
@@ -39,6 +39,8 @@ router.post('/', async (req, res) => {
|
|
|
validationErrors.push(Errors.missingParameter('name'))
|
|
|
} else if(typeof req.body.name !== 'string') {
|
|
|
validationErrors.push(Errors.invalidParameterType('name', 'string'))
|
|
|
+ } else if(!req.body.name.length) {
|
|
|
+ validationErrors.push(Errors.parameterLengthTooSmall('name', 'string'))
|
|
|
}
|
|
|
|
|
|
if(validationErrors.length) throw Errors.VALIDAITON_ERROR
|