using promise instead of callback in post module