移除调试信息
This commit is contained in:
@@ -296,10 +296,6 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打印带缩进格式化的JSON
|
|
||||||
// str, _ := json.MarshalIndent(images, "", " ")
|
|
||||||
// fmt.Println("获取图像列表成功", string(str))
|
|
||||||
|
|
||||||
// 获取用户信息(如果图像列表不为空且请求字段中包含user)
|
// 获取用户信息(如果图像列表不为空且请求字段中包含user)
|
||||||
if len(images) > 0 && strings.Contains(fields_str, "user_id") {
|
if len(images) > 0 && strings.Contains(fields_str, "user_id") {
|
||||||
// 取到所有的用户ID, 去除重复
|
// 取到所有的用户ID, 去除重复
|
||||||
|
@@ -5,7 +5,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
@@ -59,7 +58,6 @@ type SearchData struct {
|
|||||||
func (sd SearchData) GetIDList() (id_list []string) {
|
func (sd SearchData) GetIDList() (id_list []string) {
|
||||||
for _, hit := range sd.Hits.Hits {
|
for _, hit := range sd.Hits.Hits {
|
||||||
id_list = append(id_list, hit.ID)
|
id_list = append(id_list, hit.ID)
|
||||||
fmt.Println(hit.Source.Content)
|
|
||||||
}
|
}
|
||||||
return id_list
|
return id_list
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user