Hello, I have an meteor app which conect with other app backend through ddp, and call a method, the problem is: I need to wait that backend method to stop and depending on the result route the client to other page, but the client don´t wait for the method, it make the call and then continues with the execution, I try to put a callback function in the call but don´t work either, something like this:
ddp.call(‘backendMethod’, params, callback(error ,result){
if(error){
show error
}else(){
route
}
})
but both error and result are undefined because, any ideas on this thanks