Skip to content

Commit

Permalink
fix: fix dm
Browse files Browse the repository at this point in the history
  • Loading branch information
starudream committed Sep 7, 2024
1 parent 9a9e59d commit a2385ec
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/miyoushe/job/geetest.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@ func verify(c *api.Client) (data *geetest.V3Data, _ error) {
return
}

func dm(param *geetest.V3Param) (data *geetest.V3Data, err error) {
func dm(param *geetest.V3Param) (*geetest.V3Data, error) {
param.Referer = api.RefererAct

if geetest.RRKey() != "" {
return geetest.RR(param)
data, err := geetest.RR(param)
if err == nil {
return data, nil
}
}

if geetest.TTKey() != "" {
return geetest.TT(param)
data, err := geetest.TT(param)
if err == nil {
return data, nil
}
}

return
return nil, fmt.Errorf("no geetest config")
}

0 comments on commit a2385ec

Please sign in to comment.