MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / Sanitize

Method Sanitize

api/pkg/requests/webhook_store_request.go:20–31  ·  view source on GitHub ↗

Sanitize sets defaults to WebhookStore

()

Source from the content-addressed store, hash-verified

18
19// Sanitize sets defaults to WebhookStore
20func (input *WebhookStore) Sanitize() WebhookStore {
21 input.URL = input.sanitizeURL(input.URL)
22 input.SigningKey = strings.TrimSpace(input.SigningKey)
23 input.Events = input.removeStringDuplicates(input.Events)
24
25 var phoneNumbers []string
26 for _, address := range input.PhoneNumbers {
27 phoneNumbers = append(phoneNumbers, input.sanitizeAddress(address))
28 }
29
30 return *input
31}
32
33// ToStoreParams converts WebhookStore to services.WebhookStoreParams
34func (input *WebhookStore) ToStoreParams(user entities.AuthContext) *services.WebhookStoreParams {

Callers 1

StoreMethod · 0.95

Calls 3

sanitizeURLMethod · 0.80
sanitizeAddressMethod · 0.45

Tested by

no test coverage detected