How to convert Waterfall method to promise
问题 Below is a code snippet using async-waterfall method. How can i convert this using promise. async.waterfall([ function(callback){ User.update({username: user.username}, {$set: update_list}, function(err, a_user) { if (err) { err = new Error(); err.code = 400; err.message = "Unexpected error occurred." callback(err) } if (!a_user) { err = new Error(); err.code = 400; err.message = "User not found." callback(err) }else{ callback(null, "updated", user_image); } }) }, function(message, user_image