Passed
Push — main ( f24a32...53c867 )
by Acho
03:11
created

api/pkg/requests/phone_api_key_store_request.go   A

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A requests.*PhoneAPIKeyStoreRequest.Sanitize 0 3 1
1
package requests
2
3
// PhoneAPIKeyStoreRequest is the payload for storing a phone API key
4
type PhoneAPIKeyStoreRequest struct {
5
	request
6
	Name string `json:"name" example:"My Phone API Key"`
7
}
8
9
// Sanitize sets defaults to MessageReceive
10
func (input *PhoneAPIKeyStoreRequest) Sanitize() PhoneAPIKeyStoreRequest {
11
	input.Name = input.sanitizeAddress(input.Name)
12
	return *input
13
}
14