Add validation for region/platform
This commit is contained in:
parent
3d4a660c97
commit
fc504daaa6
|
@ -58,3 +58,11 @@ func (s *OvrStatApi) FetchHeroStats(platform, region, battletag string, heroes [
|
|||
|
||||
return &r, nil
|
||||
}
|
||||
|
||||
func ValidPlatform(platform string) bool {
|
||||
return platform == "pc" || platform == "xbl" || platform == "psn"
|
||||
}
|
||||
|
||||
func ValidRegion(region string) bool {
|
||||
return region == "us" || region == "eu" || region == "kr"
|
||||
}
|
Loading…
Reference in New Issue