Skip to content

Commit

Permalink
fix: fix ttocr check result loop
Browse files Browse the repository at this point in the history
  • Loading branch information
starudream committed May 29, 2024
1 parent 3bda01e commit fe1745c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions api/ocr/tt.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ func TT(key, gt, challenge, refer string) (*common.Verification, error) {
for {
time.Sleep(config.TT().Interval)
data, err = ttResult(key, resultId)
e, ok1 := resty.AsRespErr(err)
if ok1 {
v, ok2 := e.Response.Result().(interface{ GetStatus() int })
if ok2 && v.GetStatus() == 2 {
if e, ok1 := resty.AsRespErr(err); ok1 {
if v, ok2 := e.Response.Result().(interface{ GetStatus() int }); ok2 && v.GetStatus() == 2 {
continue
}
}
vch <- data
if err != nil {
return
}
return
}
}()

Expand Down

0 comments on commit fe1745c

Please sign in to comment.