According to the laws of the Bible, slavery is OK.
"Both your male and female slave, which you will have, shall be of the heathen that are round about you; of them shall you buy male and female slaves. Moreover of the children of the strangers that sojourn among you, of them shall you buy, and of their families that are with you, which they begat in your land: and they shall be your possession. And you shall take them as an inheritance for your children after you, to inherit them for a possession; they shall be your slaves forever..." Leviticus 25:44-46
When Jesus inspired people to treat others as they want to be treated, no one predicted that it was going to lead to the end of slavery. But eventually it did. It isn’t the Bible that ended slavery. The Bible says that slavery’s OK. YHWH himself allowed the Hebrews to enslave the people they conquered. Among the many sins that Jesus condemned, slavery wasn't one of them. He never called on anyone to free their own slaves or the slaves of others. Following the Biblical lead, the Catholic Church eventually instituted hereditary slavery of Africans (Pope Nicholas V's papal bull Dum diversas, 1452).
But it’s Christians that ended slavery, Christians and humanists, who in turn owe their humanist philosophy in part to Jesus’ preaching.
The elimination of slavery is a victory for relativism. According to the objective morals of days gone by, slavery was fine. It was only by championing relativist morals, morals that could mature as society matured, that Christians could eliminate slavery. Jesus’ Golden Rule beat out the Bible’s laws and traditions.