We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 92551d2 + ad62422 commit 7306866Copy full SHA for 7306866
handlers/users.go
@@ -48,7 +48,7 @@ func GetUser(c *gin.Context) *APIError {
48
49
if err == nil && value <= math.MaxInt32 {
50
user, dbError = db.GetUserById(value)
51
- } else if regexp.MustCompile(`\d`).MatchString(query) {
+ } else if regexp.MustCompile(`^\d+$`).MatchString(query) {
52
user, dbError = db.GetUserBySteamId(query)
53
} else {
54
user, dbError = db.GetUserByUsername(query)
0 commit comments