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

Method Sanitize

api/pkg/requests/heartbeat_store_request.go:19–28  ·  view source on GitHub ↗

Sanitize sets defaults to MessageOutstanding

()

Source from the content-addressed store, hash-verified

17
18// Sanitize sets defaults to MessageOutstanding
19func (input *HeartbeatStore) Sanitize() HeartbeatStore {
20 input.Owner = input.sanitizeAddress(input.Owner)
21
22 input.PhoneNumbers = input.sanitizeAddresses(input.PhoneNumbers)
23 if len(input.PhoneNumbers) == 0 {
24 input.PhoneNumbers = append(input.PhoneNumbers, input.Owner)
25 }
26
27 return *input
28}
29
30// ToStoreParams converts HeartbeatIndex to repositories.IndexParams
31func (input *HeartbeatStore) ToStoreParams(user entities.AuthContext, source string, version string) []services.HeartbeatStoreParams {

Callers 1

StoreMethod · 0.95

Calls 2

sanitizeAddressesMethod · 0.80
sanitizeAddressMethod · 0.45

Tested by

no test coverage detected