API generation

This commit is contained in:
delvedor
2019-01-30 09:33:04 +01:00
parent fbfb9479b2
commit 3bb4fda004

View File

@ -49,7 +49,7 @@ function buildIndex (opts) {
filterPath: 'filter_path'
}
return function index (params, options, callback) {
return function _index (params, options, callback) {
options = options || {}
if (typeof options === 'function') {
callback = options
@ -63,7 +63,7 @@ function buildIndex (opts) {
// promises support
if (callback == null) {
return new Promise((resolve, reject) => {
index(params, options, (err, body) => {
_index(params, options, (err, body) => {
err ? reject(err) : resolve(body)
})
})