The people chose to serve the Lord, a decision which Joshua recorded in the Book of the Law of God.
The choice of the people to serve the Lord is reflected in the act of worship, which was documented by Joshua in the Book of God's Law.