MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / List

Method List

controller/ai-key/iml.go:42–65  ·  view source on GitHub ↗
(ctx *gin.Context, providerId string, keyword string, page string, pageSize string, statuses string)

Source from the content-addressed store, hash-verified

40}
41
42func (i *imlAIKeyController) List(ctx *gin.Context, providerId string, keyword string, page string, pageSize string, statuses string) ([]*ai_key_dto.Item, int64, error) {
43 p, err := strconv.Atoi(page)
44 if err != nil {
45 if page != "" {
46 return nil, 0, err
47 }
48 p = 1
49 }
50 ps, err := strconv.Atoi(pageSize)
51 if err != nil {
52 if pageSize != "" {
53 return nil, 0, err
54 }
55 ps = 20
56 }
57 ss := make([]string, 0)
58 if statuses != "" {
59 err = json.Unmarshal([]byte(statuses), &ss)
60 if err != nil {
61 return nil, 0, err
62 }
63 }
64 return i.module.List(ctx, providerId, keyword, p, ps, ss)
65}
66
67func (i *imlAIKeyController) Sort(ctx *gin.Context, providerId string, input *ai_key_dto.Sort) error {
68 return i.module.Sort(ctx, providerId, input)

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected