Add validation for region/platform
This commit is contained in:
parent
3d4a660c97
commit
fc504daaa6
|
@ -57,4 +57,12 @@ 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