refactor cart endpoint to /api/cart and refactor routes