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

Method ListByStatus

service/subscribe/iml.go:228–239  ·  view source on GitHub ↗
(ctx context.Context, pid string, status ...int)

Source from the content-addressed store, hash-verified

226}
227
228func (i *imlSubscribeApplyService) ListByStatus(ctx context.Context, pid string, status ...int) ([]*Apply, error) {
229 w := make(map[string]interface{})
230 w["service"] = pid
231 if len(status) > 0 {
232 w["status"] = status
233 }
234 list, err := i.store.List(ctx, w, "apply_at desc")
235 if err != nil {
236 return nil, err
237 }
238 return utils.SliceToSlice(list, FromApplyEntity), nil
239}
240
241func (i *imlSubscribeApplyService) RevokeById(ctx context.Context, id string) error {
242 _, err := i.store.UpdateWhere(ctx, map[string]interface{}{"uuid": id}, map[string]interface{}{"status": -1})

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected