Skip to content

Commit

Permalink
fix: replace TextCensorResult with textCensorResult
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored and LinkinStars committed Oct 8, 2024
1 parent 4f6733f commit 8e42d3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reviewer-baidu/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ func (r *Reviewer) Review(content *plugin.ReviewContent) (result *plugin.ReviewR
}

client := censor.NewClient(r.Config.APIKey, r.Config.SecretKey)
TextCensorResult, err := client.TextCensor(content.Title+"\n"+content.Content, content.IP)
textCensorResult, err := client.TextCensor(content.Title+"\n"+content.Content, content.IP)
if err != nil {
log.Errorf("Request baidu to check failed: %v", err)
return handleReviewError(content, plugin.ReviewStatusNeedReview)
}

var jsonMap map[string]interface{}
err = json.Unmarshal([]byte(TextCensorResult), &jsonMap)
err = json.Unmarshal([]byte(textCensorResult), &jsonMap)
if err != nil {
return handleReviewError(content, plugin.ReviewStatusNeedReview)
}
Expand Down

0 comments on commit 8e42d3d

Please sign in to comment.