Sanitize sets defaults to WebhookStore
()
| 18 | |
| 19 | // Sanitize sets defaults to WebhookStore |
| 20 | func (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 |
| 34 | func (input *WebhookStore) ToStoreParams(user entities.AuthContext) *services.WebhookStoreParams { |
no test coverage detected