return error if end point not present

pull/1/head
yann300 6 years ago
parent 1638a1e139
commit e8c17819c2
  1. 7
      src/app/plugin/pluginManager.js

@ -172,7 +172,12 @@ module.exports = class PluginManager {
data.value.push((error, result) => {
response(data.key, data.type, data.id, error, result)
})
pluginAPI[data.key][data.type].apply({}, data.value)
if (pluginAPI[data.key] && pluginAPI[data.key][data.type]) {
pluginAPI[data.key][data.type].apply({}, data.value)
} else {
response(data.key, data.type, data.id, `Endpoint ${data.key}/${data.type} not present`, null)
}
}, false)
}
unregister (desc) {

Loading…
Cancel
Save