/football-app-backend
│
├── /config          # Configuration files (DB, API keys, etc.)
│   └── db.js
│   └── apiConfig.js
│
├── /controllers     # Handles the logic for various routes (articles, news, scores)
│   └── newsController.js
│   └── articlesController.js
│   └── scoresController.js

│    └──leaguesController.js

│    └──leagueController.js
│
├── /middlewares     # Middlewares for authentication, error handling, etc.
│   └── authMiddleware.js
│   └── errorMiddleware.js
│
├── /models          # Database models/schemas (MongoDB, etc.)
│   └── articleModel.js
│   └── newsModel.js
│   └── scoreModel.js
│
├── /routes          # Route definitions and associations to controllers
│   └── newsRoutes.js
│   └── articleRoutes.js
│   └── scoreRoutes.js

│   └── standingRoutes.js

│    └──leagueRoutes.js

│
│
├── /services        # Business logic and interaction with external APIs
│   └── apiService.js
│
├── /taskQueue       # Task queue configuration for scheduled tasks
│   └── matchUpdateQueue.js
│   └── taskQueueWorker.js
│
├── /utils           # Utility functions, helpers
│   └── helper.js
│
├── server.js        # Entry point for starting the Express app
│

├──.env

│
└── package.json     # Package file for dependencies
This is my file structure for football app backend now what I want is to have leagueController.js and leaguesController.js while using API_FOOTBALL_KEY1 and I have used two keys 
I'll show you how I have implemented liveScores and now you have to make me leagueController first you only show league info and teams in league only 
const axios = require("axios");

async function scoresController(req, res) {
  try {
    const apiUrl = "https://api.football-data.org/v4/matches";
    const response = await axios.get(apiUrl, {
      headers: {
        "X-Auth-Token": process.env.API_FOOTBALL_KEY,
      },
      params: {
        dateFrom: new Date().toISOString().split("T")[0],
        dateTo: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
          .toISOString()
          .split("T")[0],
      },
    });

    const leagueIds = {
      2014: "La Liga",
      2021: "Premier League",
      2002: "Bundesliga",
      2019: "Serie A",
      2015: "Ligue 1",
      2001: "UEFA Champions League",
      2146: "UEFA Europa League",
    };

    const filteredMatches = response.data.matches.map((match) => {
      const leagueName = leagueIds[match.competition.id] || "Other";
      return {
        id: match.id,
        utcDate: match.utcDate,
        status: match.status,
        league: leagueName,
        homeTeam: match.homeTeam,
        awayTeam: match.awayTeam,
        score: match.score,
        odds: Math.random().toFixed(2), // Mock data
        avgP: (Math.random() * 100).toFixed(2), // Mock data
        avgG: (Math.random() * 5).toFixed(2), // Mock data
        cG: Math.floor(Math.random() * 10), // Mock data
        BTS: Math.random() > 0.5 ? "Yes" : "No", // Mock data
        FTS: Math.random() > 0.5 ? "Yes" : "No", // Mock data
        "c>2,5": Math.random() > 0.5 ? "Yes" : "No", // Mock data
      };
    });

    const groupedMatches = filteredMatches.reduce((acc, match) => {
      if (!acc[match.league]) {
        acc[match.league] = [];
      }
      acc[match.league].push(match);
      return acc;
    }, {});

    res.status(200).json(groupedMatches);
  } catch (error) {
    console.error("Error fetching live scores:", error.message);
    res.status(500).json({
      message: "Unable to retrieve live scores. Please try again later.",
    });
  }
}

module.exports = scoresController;

// services/apiService.js
const axios = require("axios");
const { footballApiUrl, apiKey } = require("../apiConfig");

// Fetch live scores
const fetchLiveScores = async () => {
  try {
    const response = await axios.get(`${footballApiUrl}/matches`, {
      headers: { "X-Auth-Token": apiKey },
    });
    return response.data;
  } catch (error) {
    console.error("Error fetching live scores:", error);
    throw new Error("Could not fetch live scores");
  }
};

module.exports = { fetchLiveScores };

const cron = require("node-cron");
const axios = require("axios");

// Function to fetch live scores
const fetchLiveScores = async () => {
  try {
    const response = await axios.get(
      "https://api.football-data.org/v4/matches",
      {
        headers: { "X-Auth-Token": process.env.API_FOOTBALL_KEY },
      }
    );
    console.log("Live scores fetched:", response.data);
  } catch (error) {
    console.error("Error fetching live scores:", error);
  }
};

// Function to start the cron job (run every 1 minutes)
const start = () => {
  cron.schedule("*/1 * * * *", async () => {
    console.log("Fetching live scores...");
    await fetchLiveScores();
  });
  console.log("Cron job started: Fetching live scores every 5 minutes");
};

module.exports = { start };

// taskQueueWorker.js
const { fetchLiveScores } = require("./services/apiService");
const { start } = require("./taskQueue/matchUpdateQueue");
// Initialize cron job worker to start fetching live scores every 5 minutes
start();

// You can add other workers or background tasks here as needed

Now don't change my previous code make me new code for the above problem and I don't want to use caching and bullmQ and also only leagues and their teams should be fetched from API and I'll show you how my api documentation is for fetching 
curl -X GET http://api.football-data.org/v4/competitions/PL
(Abbreviated) Response:
{
    "area": {
        "id": 2072,
        "name": "England",
        "code": "ENG",
        "flag": "https://crests.football-data.org/770.svg"
    },
    "id": 2021,
    "name": "Premier League",
    "code": "PL",
    "type": "LEAGUE",
    "emblem": "https://crests.football-data.org/PL.png",
    "currentSeason": {
        "id": 733,
        "startDate": "2021-08-13",
        "endDate": "2022-05-22",
        "currentMatchday": 37,
        "winner": null,
        "stages": [
            "REGULAR_SEASON"
        ]
    },
    "seasons": [
        {
            "id": 733,
            "startDate": "2021-08-13",
            "endDate": "2022-05-22",
            "currentMatchday": 37,
            "winner": null,
            "stages": [
                "REGULAR_SEASON"
            ]
        },
        {
            "id": 619,
            "startDate": "2020-09-12",
            "endDate": "2021-05-23",
            "currentMatchday": 38,
            "winner": {
                "id": 65,
                "name": "Manchester City FC",
                "shortName": "Man City",
                "tla": "MCI",
                "crest": "https://crests.football-data.org/65.png",
                "address": "SportCity Manchester M11 3FF",
                "website": "https://www.mancity.com",
                "founded": 1880,
                "clubColors": "Sky Blue / White",
                "venue": "Etihad Stadium",
                "lastUpdated": "2022-02-10T19:48:37Z"
            },
            "stages": [
                "REGULAR_SEASON"
            ]
        },
        {
            "id": 468,
            "startDate": "2019-08-09",
            "endDate": "2020-07-26",
            "currentMatchday": 38,
            "winner": {
                "id": 64,
                "name": "Liverpool FC",
                "shortName": "Liverpool",
                "tla": "LIV",
                "crest": "https://crests.football-data.org/64.png",
                "address": "Anfield Road Liverpool L4 0TH",
                "website": "http://www.liverpoolfc.tv",
                "founded": 1892,
                "clubColors": "Red / White",
                "venue": "Anfield",
                "lastUpdated": "2022-02-10T19:30:22Z"
            },
            "stages": [
                "REGULAR_SEASON"
            ]
        },
curl -X GET http://api.football-data.org/v4/competitions/PL/standings
(Abbreviated) Response:
{
    "filters": {
        "season": "2021"
    },
    "area": {
        "id": 2072,
        "name": "England",
        "code": "ENG",
        "flag": "https://crests.football-data.org/770.svg"
    },
    "competition": {
        "id": 2021,
        "name": "Premier League",
        "code": "PL",
        "type": "LEAGUE",
        "emblem": "https://crests.football-data.org/PL.png"
    },
    "season": {
        "id": 733,
        "startDate": "2021-08-13",
        "endDate": "2022-05-22",
        "currentMatchday": 37,
        "winner": null,
        "stages": [
            "REGULAR_SEASON"
        ]
    },
    "standings": [
        {
            "stage": "REGULAR_SEASON",
            "type": "TOTAL",
            "group": null,
            "table": [
                {
                    "position": 1,
                    "team": {
                        "id": 65,
                        "name": "Manchester City FC",
                        "shortName": "Man City",
                        "tla": "MCI",
                        "crest": "https://crests.football-data.org/65.png"
                    },
                    "playedGames": 37,
                    "form": "D,W,W,W,W",
                    "won": 28,
                    "draw": 6,
                    "lost": 3,
                    "points": 90,
                    "goalsFor": 96,
                    "goalsAgainst": 24,
                    "goalDifference": 72
                },
                {
                    "position": 2,
                    "team": {
                        "id": 64,
                        "name": "Liverpool FC",
                        "shortName": "Liverpool",
                        "tla": "LIV",
                        "crest": "https://crests.football-data.org/64.png"
                    },
                    "playedGames": 36,
                    "form": "W,D,W,W,W",
                    "won": 26,
                    "draw": 8,
                    "lost": 2,
                    "points": 86,
                    "goalsFor": 89,
                    "goalsAgainst": 24,
                    "goalDifference": 65
                },
                {
                    "position": 3,
                    "team": {
                        "id": 61,
                        "name": "Chelsea FC",
                        "shortName": "Chelsea",
                        "tla": "CHE",
                        "crest": "https://crests.football-data.org/61.png"
                    },
                    "playedGames": 36,
                    "form": "W,D,L,D,W",
                    "won": 20,
                    "draw": 10,
                    "lost": 6,
                    "points": 70,
                    "goalsFor": 73,
                    "goalsAgainst": 31,
                    "goalDifference": 42
                },
                {
                    "position": 4,
                    "team": {
                        "id": 73,
                        "name": "Tottenham Hotspur FC",
                        "shortName": "Tottenham",
                        "tla": "TOT",
                        "crest": "https://crests.football-data.org/73.svg"
                    },
                    "playedGames": 37,
                    "form": "W,W,D,W,D",
                    "won": 21,
                    "draw": 5,
                    "lost": 11,
                    "points": 68,
                    "goalsFor": 64,
                    "goalsAgainst": 40,
                    "goalDifference": 24
                },
                {
                    "position": 5,
                    "team": {
                        "id": 57,
                        "name": "Arsenal FC",
                        "shortName": "Arsenal",
                        "tla": "ARS",
                        "crest": "https://crests.football-data.org/57.png"
                    },
                    "playedGames": 37,
                    "form": "L,L,W,W,W",
                    "won": 21,
                    "draw": 3,
                    "lost": 13,
                    "points": 66,
                    "goalsFor": 56,
                    "goalsAgainst": 47,
                    "goalDifference": 9
                },
                {
curl -X GET http://api.football-data.org/v4/competitions/WC/teams
(Abbreviated) Response:
{
    "count": 32,
    "filters": {
        "season": "2022"
    },
    "competition": {
        "id": 2000,
        "name": "FIFA World Cup",
        "code": "WC",
        "type": "CUP",
        "emblem": "https://crests.football-data.org/qatar.png"
    },
    "season": {
        "id": 1382,
        "startDate": "2022-11-21",
        "endDate": "2022-12-18",
        "currentMatchday": 1,
        "winner": null,
        "stages": [
            "GROUP_STAGE",
            "LAST_16",
            "QUARTER_FINALS",
            "SEMI_FINALS",
            "THIRD_PLACE",
            "FINAL"
        ]
    },
    "teams": [
        {
            "area": {
                "id": 2257,
                "name": "Uruguay",
                "code": "URY",
                "flag": null
            },
            "id": 758,
            "name": "Uruguay",
            "shortName": "Uruguay",
            "tla": "URU",
            "crest": "https://crests.football-data.org/758.svg",
            "address": "Guayaybo 1531 Montevideo 11200",
            "website": "http://www.auf.org.uy",
            "founded": 1900,
            "clubColors": "Sky Blue / White / Black",
            "venue": "Estadio Centenario",
            "runningCompetitions": [
                {
                    "id": 2000,
                    "name": "FIFA World Cup",
                    "code": "WC",
                    "type": "CUP",
                    "emblem": "https://crests.football-data.org/qatar.png"
                }
            ],
            "coach": {
                "id": null,
                "firstName": null,
                "lastName": null,
                "name": null,
                "dateOfBirth": null,
                "nationality": null,
                "contract": {
                    "start": null,
                    "until": null
                }
            },
            "marketValue": null,
            "squad": [],
            "staff": [],
            "lastUpdated": "2021-05-22T11:54:30Z"
        },
        {
            "area": {
                "id": 2088,
                "name": "Germany",
                "code": "DEU",
                "flag": "https://crests.football-data.org/759.svg"
            },
            "id": 759,
            "name": "Germany",
            "shortName": "Germany",
            "tla": "GER",
            "crest": "https://crests.football-data.org/759.svg",
            "address": "Otto-Fleck-Schneise 6 / Postfach 710265 Frankfurt am Main 60492",
            "website": "http://www.dfb.de",
            "founded": 1900,
            "clubColors": "White / Black",
            "venue": "RheinEnergieSTADION",
            "runningCompetitions": [
                {
                    "id": 2000,
                    "name": "FIFA World Cup",
                    "code": "WC",
                    "type": "CUP",
                    "emblem": "https://crests.football-data.org/qatar.png"
                }
            ],
THis is request and response from API make me new leagueController and leaguesController using API_FOOTBALL_KEY1 and do not change existing code for other things