Add validation for region/platform
This commit is contained in:
		@ -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"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user