We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4285c1 commit c4e3467Copy full SHA for c4e3467
1 file changed
server/controllers/things/models/types/media.js
@@ -0,0 +1,12 @@
1
+const CONFIG = require('config')
2
+const __ = CONFIG.universalPath
3
+const _ = __.require('lib', 'utils')
4
+const error_ = __.require('lib', 'error')
5
+
6
+module.exports = {
7
+ validateData: function (data) {
8
+ if (!_.isNonEmptyString(data.name)) {
9
+ throw error_.new('Name attribute missing.', 400, data)
10
+ }
11
12
+}
0 commit comments