Modified for use with for Retro Rewind

This commit is contained in:
ZPL 2024-07-13 19:57:45 -05:00 committed by ppeb
parent f1741b0718
commit c7a261e721
No known key found for this signature in database
GPG Key ID: CC147AD1B3D318D0

View File

@ -142,7 +142,7 @@ func checkValidRating(moduleName string, payload map[string]string) string {
// ev and eb values must be in range 1 to 9999
if ev := payload["ev"]; ev != "" {
evInt, err := strconv.ParseInt(ev, 10, 16)
if err != nil || evInt < 1 || evInt > 9999 {
if err != nil || evInt < 1 || evInt > 30000 {
logging.Error(moduleName, "Invalid ev value:", aurora.Cyan(ev))
return "invalid_elo"
}
@ -150,7 +150,7 @@ func checkValidRating(moduleName string, payload map[string]string) string {
if eb := payload["eb"]; eb != "" {
ebInt, err := strconv.ParseInt(eb, 10, 16)
if err != nil || ebInt < 1 || ebInt > 9999 {
if err != nil || ebInt < 1 || ebInt > 30000 {
logging.Error(moduleName, "Invalid eb value:", aurora.Cyan(eb))
return "invalid_elo"
}