@@ -35,19 +35,19 @@ func (e entity) Create(user model.User) (unit21Id string, err error) {
3535
3636 // ultimately may want a join here.
3737
38- communications , err := e .getCommunications (user .ID )
38+ communications , err := e .getCommunications (user .Id )
3939 if err != nil {
4040 log .Err (err ).Msg ("Failed to gather Unit21 entity communications" )
4141 return "" , common .StringError (err )
4242 }
4343
44- digitalData , err := e .getEntityDigitalData (user .ID )
44+ digitalData , err := e .getEntityDigitalData (user .Id )
4545 if err != nil {
4646 log .Err (err ).Msg ("Failed to gather Unit21 entity digitalData" )
4747 return "" , common .StringError (err )
4848 }
4949
50- customData , err := e .getCustomData (user .ID )
50+ customData , err := e .getCustomData (user .Id )
5151 if err != nil {
5252 log .Err (err ).Msg ("Failed to gather Unit21 entity customData" )
5353 return "" , common .StringError (err )
@@ -77,29 +77,29 @@ func (e entity) Update(user model.User) (unit21Id string, err error) {
7777
7878 // ultimately may want a join here.
7979
80- communications , err := e .getCommunications (user .ID )
80+ communications , err := e .getCommunications (user .Id )
8181 if err != nil {
8282 log .Err (err ).Msg ("Failed to gather Unit21 entity communications" )
8383 err = common .StringError (err )
8484 return
8585 }
8686
87- digitalData , err := e .getEntityDigitalData (user .ID )
87+ digitalData , err := e .getEntityDigitalData (user .Id )
8888 if err != nil {
8989 log .Err (err ).Msg ("Failed to gather Unit21 entity digitalData" )
9090 err = common .StringError (err )
9191 return
9292 }
9393
94- customData , err := e .getCustomData (user .ID )
94+ customData , err := e .getCustomData (user .Id )
9595 if err != nil {
9696 log .Err (err ).Msg ("Failed to gather Unit21 entity customData" )
9797 err = common .StringError (err )
9898 return
9999 }
100100
101101 orgName := os .Getenv ("UNIT21_ORG_NAME" )
102- url := "https://" + os .Getenv ("UNIT21_ENV" ) + ".unit21.com/v1/" + orgName + "/entities/" + user .ID + "/update"
102+ url := "https://" + os .Getenv ("UNIT21_ENV" ) + ".unit21.com/v1/" + orgName + "/entities/" + user .Id + "/update"
103103 body , err := u21Put (url , mapUserToEntity (user , communications , digitalData , customData ))
104104
105105 if err != nil {
@@ -182,7 +182,7 @@ func (e entity) getCustomData(userId string) (customData entityCustomData, err e
182182 }
183183
184184 for _ , platform := range devices {
185- customData .Platforms = append (customData .Platforms , platform .PlatformID )
185+ customData .Platforms = append (customData .Platforms , platform .PlatformId )
186186 }
187187 return
188188}
@@ -197,7 +197,7 @@ func mapUserToEntity(user model.User, communication entityCommunication, digital
197197
198198 jsonBody := & u21Entity {
199199 GeneralData : & entityGeneral {
200- EntityId : user .ID ,
200+ EntityId : user .Id ,
201201 EntityType : "user" ,
202202 Status : user .Status ,
203203 RegisteredAt : int (user .CreatedAt .Unix ()),
0 commit comments