Did God approve of slavery in the Bible? No. Absolutely not.

There is a difference between a servant, and a slave.

Servants are essentially what we would call today "employees" (or "contractors"). Employees are protected by law, and that's exactly what the Israelites had. There were set rules for servants in the book of Exodus and Leviticus.

Slavery is "a condition of having to work very hard without proper remuneration or appreciation". They were often treated harshly.

Slavery did happen in those days of course, and in fact the Israelites were held "in bondage" in Egypt for many years.

And they made their lives bitter with hard bondage, in mortar, and in brick, and in all manner of service in the field: all their service, where in they made them serve, was with rigor.
- Exodus 1:14 (KJV)

So yes, slavery was recorded in the Bible as something that happened, but God certainly did not approve of it.