then for function that don.t return promise code example
Example: nodejs promise then example
p.then(onFulfilled, onRejected);
p.then(function(value) {
// run
}, function(reason) {
// fail
});
p.then(onFulfilled, onRejected);
p.then(function(value) {
// run
}, function(reason) {
// fail
});