mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-19 19:47:49 +01:00
webapi: /search/result always return stats if requested
This commit is contained in:
@@ -177,7 +177,7 @@ func apiSearchResult(w http.ResponseWriter, r *http.Request) {
|
||||
result.Status = 1 // No more results to expect
|
||||
|
||||
// embedded statistics?
|
||||
if returnStats, _ := strconv.ParseBool(r.Form.Get("stats")); returnStats && len(result.Files) > 0 {
|
||||
if returnStats, _ := strconv.ParseBool(r.Form.Get("stats")); returnStats {
|
||||
result.Statistic = job.Statistics()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user