changed routes to /api/...