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

Method ToUpdateParams

api/pkg/requests/user_update_request.go:27–43  ·  view source on GitHub ↗

ToUpdateParams converts UserUpdate to services.UserUpdateParams

()

Source from the content-addressed store, hash-verified

25
26// ToUpdateParams converts UserUpdate to services.UserUpdateParams
27func (input *UserUpdate) ToUpdateParams() services.UserUpdateParams {
28 location, err := time.LoadLocation(input.Timezone)
29 if err != nil {
30 location = time.UTC
31 }
32
33 var activePhoneID *uuid.UUID
34 if input.ActivePhoneID != "" {
35 val := uuid.MustParse(input.ActivePhoneID)
36 activePhoneID = &val
37 }
38
39 return services.UserUpdateParams{
40 ActivePhoneID: activePhoneID,
41 Timezone: location,
42 }
43}

Callers 1

UpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected