created REST API for leagues and related front-end routes