AlanOC91 / YGOPRODeck

Yu-Gi-Oh! Card Database and Deck Share Site
81 stars 4 forks source link

Wrong validation of parameter type for "Pendulum Effect Ritual Monster" #503

Open Micle-1999 opened 3 months ago

Micle-1999 commented 3 months ago

By calling the url: https://db.ygoprodeck.com/api/v7/cardinfo.php?type=Pendulum%20Effect%20Ritual%20Monster it gives the error:

{
    "error": "Type value of pendulum effect ritual monster is invalid. Please use a correct Type value. Type accepts 'Skill Card', 'Spell Card', 'Trap Card', 'Normal Monster', 'Normal Tuner Monster', 'Effect Monster', 'Tuner Monster', 'Flip Monster', 'Flip Effect Monster', 'Flip Tuner Effect Monster', 'Spirit Monster', 'Union Effect Monster', 'Gemini Monster', 'Pendulum Effect Monster', 'Pendulum Normal Monster', 'Pendulum Tuner Effect Monster', 'Ritual Monster', 'Ritual Effect Monster', 'Toon Monster', 'Fusion Monster', 'Synchro Monster', 'Synchro Tuner Monster', 'Synchro Pendulum Effect Monster', 'XYZ Monster', 'XYZ Pendulum Effect Monster', 'Link Monster', 'Pendulum Flip Effect Monster', 'Pendulum Effect Fusion Monster' or 'Token' and is not case sensitive."
}

BUT if I call this: https://db.ygoprodeck.com/api/v7/cardinfo.php?id=66425726 it gives a card with the type "Pendulum Effect Ritual Monster"

I suggest to add "Pendulum Effect Ritual Monster" in the type parameter validation so it will be possible to search for this type without errors. Thanks!