MCPcopy
hub / github.com/apache/answer / AdminSearchList

Method AdminSearchList

internal/service/answer_common/answer.go:76–86  ·  view source on GitHub ↗
(ctx context.Context, req *schema.AdminAnswerPageReq)

Source from the content-addressed store, hash-verified

74}
75
76func (as *AnswerCommon) AdminSearchList(ctx context.Context, req *schema.AdminAnswerPageReq) (
77 resp []*entity.Answer, count int64, err error) {
78 resp, count, err = as.answerRepo.AdminSearchList(ctx, req)
79 if handler.GetEnableShortID(ctx) {
80 for _, item := range resp {
81 item.ID = uid.EnShortID(item.ID)
82 item.QuestionID = uid.EnShortID(item.QuestionID)
83 }
84 }
85 return resp, count, err
86}
87
88func (as *AnswerCommon) Search(ctx context.Context, search *entity.AnswerSearch) ([]*entity.Answer, int64, error) {
89 list, count, err := as.answerRepo.SearchList(ctx, search)

Callers

nothing calls this directly

Calls 3

GetEnableShortIDFunction · 0.92
EnShortIDFunction · 0.92
AdminSearchListMethod · 0.65

Tested by

no test coverage detected