Skip to content

Missing 'countrySlug' in 'GetGamesByFiltersParams' causes league name collisions #15

Description

@nns52k

Describe the bug

The GetGamesByFiltersParams type in @azuro-org/toolkit currently lacks a countrySlug field. This omission makes it impossible to distinguish between leagues that share the exact same leagueSlug but belong to different countries (e.g., "Premier League" in different regions or generic league names like "Cup").

To Reproduce

  1. Attempt to fetch games using GetGamesByFiltersParams for a specific country's league.
  2. Notice that if another country has a league with the identical leagueSlug, the filters cannot uniquely isolate the desired league due to the missing country identifier.

Expected behavior

GetGamesByFiltersParams should include an optional (or required, depending on the architecture) countrySlug: string field. This ensures that queries can accurately scope leagues down to their respective countries and avoid data collision.

Suggested Solution

Update the type definition to include countrySlug:

export type GetGamesByFiltersParams = {
  sportSlug: string
  countrySlug?: string // <-- Add this field
  leagueSlug?: string
  // ... other existing fields
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions