Skip to content

Commit

Permalink
fix:空切片的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lanyi1998 committed May 30, 2023
1 parent e2ee199 commit 44e52d4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Http/Route.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,17 @@ func BulkVerifyHttp(w http.ResponseWriter, r *http.Request) {
}
}
}
resp := BulkRespData{
HTTPStatusCode: "200",
Msg: removeDuplication(result),
var resp BulkRespData
if len(result) == 0 {
resp = BulkRespData{
HTTPStatusCode: "200",
Msg: result,
}
} else {
resp = BulkRespData{
HTTPStatusCode: "200",
Msg: removeDuplication(result),
}
}
fmt.Fprint(w, JsonRespData(resp))
} else {
Expand Down

0 comments on commit 44e52d4

Please sign in to comment.