|
|
@@ -173,6 +173,7 @@ func (s *SlideImage) Verify(id string, x int) bool { |
|
|
|
imageRandX, _ := strconv.Atoi(values[1]) |
|
|
|
if int(math.Abs(float64(imageRandX-x))) <= s.Tolerance { |
|
|
|
redis_client.SETNX(redisConn, s.mkey(id), "1", s.Expiration) |
|
|
|
return true |
|
|
|
} |
|
|
|
return false |
|
|
|
|
|
|
|