MCPcopy Create free account
hub / github.com/daodst/chat / GetAllPushRules

Function GetAllPushRules

clientapi/routing/pushrules.go:33–42  ·  view source on GitHub ↗
(ctx context.Context, device *userapi.Device, userAPI userapi.ClientUserAPI)

Source from the content-addressed store, hash-verified

31}
32
33func GetAllPushRules(ctx context.Context, device *userapi.Device, userAPI userapi.ClientUserAPI) util.JSONResponse {
34 ruleSets, err := queryPushRules(ctx, device.UserID, userAPI)
35 if err != nil {
36 return errorResponse(ctx, err, "queryPushRulesJSON failed")
37 }
38 return util.JSONResponse{
39 Code: http.StatusOK,
40 JSON: ruleSets,
41 }
42}
43
44func GetPushRulesByScope(ctx context.Context, scope string, device *userapi.Device, userAPI userapi.ClientUserAPI) util.JSONResponse {
45 ruleSets, err := queryPushRules(ctx, device.UserID, userAPI)

Callers 1

SetupFunction · 0.85

Calls 2

queryPushRulesFunction · 0.85
errorResponseFunction · 0.85

Tested by

no test coverage detected