| @@ -9,7 +9,7 @@ import ( | |||
| ) | |||
| type crmdLead struct { | |||
| ID string `json:"id"` | |||
| ID string `json:"id,omitempty"` | |||
| Name string `json:"name,omitempty"` | |||
| Deleted bool `json:"deleted,omitempty"` | |||
| SalutationName string `json:"salutationName,omitempty"` | |||
| @@ -165,8 +165,8 @@ func crmPrepareLeadUploadHTTPHeader() (headers map[string]string) { | |||
| return headers | |||
| } | |||
| func crmGetLeadByID(id string) (r crmdLead, err error) { | |||
| resp, err := crmGetEntity("Lead", id) | |||
| err = json.Unmarshal([]byte(resp), &r) | |||
| func crmGetLead(id string) (r crmdLead, err error) { | |||
| entity, err := crmGetEntity("Lead", id) | |||
| r = entity.(crmdLead) | |||
| return | |||
| } | |||