We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1386c0f commit ad62422Copy full SHA for ad62422
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