I want to make a leagueController.js, which help me find out about each league and things about that league, And want to have matchUpdateQueue which will fetch data from the site as requested time to time maybe?? do you think we need this matchUpdateQueue or league update Queue 
// controllers/leagueController.js

const axios = require("axios");
const Bottleneck = require("bottleneck");

// Initialize Bottleneck for rate limiting
const limiter = new Bottleneck({
  minTime: 70000, // 7 seconds between requests (~8-9 requests per minute)
});

/**
 * leagueController - Fetches detailed information about a specific league.
 *
 * @param {Object} req - Express request object.
 * @param {Object} res - Express response object.
 */
async function leagueController(req, res) {
  const { leagueId } = req.params;

  if (!leagueId) {
    return res.status(400).json({ message: "League ID is required." });
  }

  const API_BASE_URL1 = "https://api.football-data.org/v4";
  const API_KEY = process.env.API_FOOTBALL_KEY;

  // Predefined list of valid competition codes
  const validCompetitionCodes = [
    "PL", // Premier League
    "PD", // La Liga
    "BL1", // Bundesliga
    "SA", // Serie A
    "FL1", // Ligue 1
    "CL", // UEFA Champions League
    "EL", // UEFA Europa League
    // Add more codes as necessary
  ];

  const competitionCode = leagueId.toUpperCase();

  if (!validCompetitionCodes.includes(competitionCode)) {
    return res.status(400).json({
      message: "Invalid League ID. It should be a valid competition code.",
    });
  }

  try {
    // Log the competition code for debugging
    console.log(`Requesting data for competitionCode: ${competitionCode}`);

    // 1. Fetch League Details
    const leagueResponse = await limiter.schedule(() =>
      axios.get(`${API_BASE_URL}/competitions/${competitionCode}`, {
        headers: { "X-Auth-Token": API_KEY },
        timeout: 10000, // 10 seconds timeout
      })
    );

    const leagueData = leagueResponse.data;

    // 2. Fetch Standings
    const standingsResponse = await limiter.schedule(() =>
      axios.get(`${API_BASE_URL}/competitions/${competitionCode}/standings`, {
        headers: { "X-Auth-Token": API_KEY },
        timeout: 10000,
      })
    );

    const standingsData = standingsResponse.data;

    // 3. Fetch Top Scorers
    const scorersResponse = await limiter.schedule(() =>
      axios.get(`${API_BASE_URL}/competitions/${competitionCode}/scorers`, {
        headers: { "X-Auth-Token": API_KEY },
        timeout: 10000,
      })
    );

    const scorersData = scorersResponse.data;

    // Process League Info
    const leagueInfo = {
      id: leagueData.id,
      name: leagueData.name,
      area: leagueData.area.name,
      code: leagueData.code,
      type: leagueData.type,
      emblem: leagueData.emblem,
      currentSeason: leagueData.currentSeason,
      lastUpdated: leagueData.lastUpdated,
    };

    // Process Standings (Assuming 'TOTAL' standings type)
    const totalStanding = standingsData.standings.find(
      (standing) => standing.type === "TOTAL"
    );

    const standings = totalStanding
      ? totalStanding.table.map((team) => ({
          position: team.position,
          team: team.team.name,
          playedGames: team.playedGames,
          won: team.won,
          draw: team.draw,
          lost: team.lost,
          points: team.points,
          goalsFor: team.goalsFor,
          goalsAgainst: team.goalsAgainst,
          goalDifference: team.goalDifference,
        }))
      : [];

    // Process Top Scorers (Top 10)
    const topScorers = scorersData.scorers.slice(0, 10).map((scorer) => ({
      player: scorer.player.name,
      team: scorer.team.name,
      goals: scorer.numberOfGoals,
    }));

    // Respond with the aggregated data
    res.status(200).json({
      league: leagueInfo,
      standings,
      topScorers,
    });
  } catch (error) {
    if (error.response) {
      // API responded with a status outside 2xx
      console.error("API Error Response:", error.response.data);
      console.error("Status Code:", error.response.status);

      if (error.response.status === 404) {
        return res.status(404).json({
          message: "League not found. Please verify the league ID.",
        });
      } else if (error.response.status === 403) {
        return res.status(403).json({
          message: "Access forbidden. Check your API key and permissions.",
        });
      } else if ([500, 502, 504].includes(error.response.status)) {
        return res.status(error.response.status).json({
          message: `Server error (${error.response.status}). Please try again later.`,
        });
      } else if (error.response.status === 400) {
        return res.status(400).json({
          message: "Invalid competition ID or code provided.",
        });
      } else {
        return res.status(error.response.status).json({
          message: "An unexpected error occurred.",
        });
      }
    } else if (error.request) {
      // No response received from API
      console.error("No response received from API:", error.request);
      return res.status(503).json({
        message: "Service unavailable. Please try again later.",
      });
    } else {
      // Error setting up the request
      console.error("Error setting up API request:", error.message);
      return res.status(500).json({
        message: "Internal server error.",
      });
    }
  }
}

module.exports = leagueController;

This is previous version of leagueController, it is giving me answer 
{
    "message": "Invalid League ID. It should be a valid competition code."
}
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"
            ]
        },
        {
This is sample API and It's call's response
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"
        ]
    },
This is also sample API and call's response
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",


curl -X GET http://api.football-data.org/v4/competitions/SA/scorers
(Abbreviated) Response:
{
    "count": 10,
    "filters": {
        "season": "2021",
        "limit": 10
    },
    "competition": {
        "id": 2019,
        "name": "Serie A",
        "code": "SA",
        "type": "LEAGUE",
        "emblem": "https://crests.football-data.org/SA.png"
    },
    "season": {
        "id": 757,
        "startDate": "2021-08-21",
        "endDate": "2022-05-22",
        "currentMatchday": 37,
        "winner": null,
        "stages": [
            "REGULAR_SEASON"