Add validation for region/platform

This commit is contained in:
Tyler 2017-09-19 01:09:05 -04:00
parent 3d4a660c97
commit fc504daaa6
1 changed files with 8 additions and 0 deletions

View File

@ -58,3 +58,11 @@ func (s *OvrStatApi) FetchHeroStats(platform, region, battletag string, heroes [
return &r, nil 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"
}