man90es / BDO-REST-API

Scraper for Black Desert Online community data with a built-in API server.
https://man90es.github.io/BDO-REST-API/
MIT License
14 stars 3 forks source link

Change minimum number of characters for 3 #31

Closed huarlensouza closed 1 month ago

huarlensouza commented 1 month ago

Endporint: /v1/adventurer/search

When searching for adventurers with 2 characters it is returning "false" due to the minimum quantity, it turns out that it is possible to create a family name with 2 digits

Examples: Region: SA FamilyName: L1

Region: SA FamilyName: xR

if len(query[0]) < 3 || len(query[0]) > 16 { return query[0], false }

validators/ValidateAdventurerNameQueryParam.go

image

man90es commented 1 month ago

Thanks for bringing this to my attention, looks like different regions can have different limits, because there's no such family names on EU or NA. I will change the validator soon