Does anyone know how to return a Promise result from a cloud code module? I use examples here , but he continues to tell me that the parameters are undefined (or nothing if I check first with (options).
I call the function with module.functionas a promise, but still not getting the results.
And ideas?
Edit: I can make it work, but by calling:
module.function({},{
success:function(res){
},
error:function(err){
}
})
but this is not very cool, since 1) I have to insert an empty object there. 2) I can not make the object work as a promise and, therefore, lose the ability to chain.
source
share