Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
KenWilliamson committed Sep 18, 2023
1 parent e23019a commit f799bd1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions delegates/homeDelegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,36 @@ import (

// AddHome AddHome
func (d *MCDelegate) AddHome(a *Home) *ResponseID {
var arrtn ResponseID
var hrrtn ResponseID
aJSON, err := json.Marshal(a)
if err == nil {
aarq, err := d.buildRequest(http.MethodPost, "/rs/home/add", aJSON, adminKey)
if err == nil {
aasuc, stat := d.proxy.Do(aarq, &arrtn)
arrtn.Code = int64(stat)
aasuc, stat := d.proxy.Do(aarq, &hrrtn)
hrrtn.Code = int64(stat)
d.Log.Debug("suc: ", aasuc)
d.Log.Debug("stat: ", stat)
}
}
d.Log.Debug("rtn: ", arrtn)
return &arrtn
d.Log.Debug("rtn: ", hrrtn)
return &hrrtn
}

// UpdateHome UpdateHome
func (d *MCDelegate) UpdateHome(r *Home) *Response {
var uartn Response
var uhrtn Response
aJSON, err := json.Marshal(r)
if err == nil {
rq, err := d.buildRequest(http.MethodPut, "/rs/home/update", aJSON, adminKey)
if err == nil {
usuc, stat := d.proxy.Do(rq, &uartn)
uartn.Code = int64(stat)
usuc, stat := d.proxy.Do(rq, &uhrtn)
uhrtn.Code = int64(stat)
d.Log.Debug("suc: ", usuc)
d.Log.Debug("stat: ", stat)
}
}
d.Log.Debug("rtn: ", uartn)
return &uartn
d.Log.Debug("rtn: ", uhrtn)
return &uhrtn
}

// GetHome GetHome
Expand Down
20 changes: 10 additions & 10 deletions delegates/privacyPolicyDelegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,36 @@ import (

// AddPrivacyPolicy AddPrivacyPolicy
func (d *MCDelegate) AddPrivacyPolicy(a *PrivacyPolicy) *ResponseID {
var arrtn ResponseID
var aprtn ResponseID
aJSON, err := json.Marshal(a)
if err == nil {
aarq, err := d.buildRequest(http.MethodPost, "/rs/privacyPolicy/add", aJSON, adminKey)
if err == nil {
aasuc, stat := d.proxy.Do(aarq, &arrtn)
arrtn.Code = int64(stat)
aasuc, stat := d.proxy.Do(aarq, &aprtn)
aprtn.Code = int64(stat)
d.Log.Debug("suc: ", aasuc)
d.Log.Debug("stat: ", stat)
}
}
d.Log.Debug("rtn: ", arrtn)
return &arrtn
d.Log.Debug("rtn: ", aprtn)
return &aprtn
}

// UpdatePrivacyPolicy UpdatePrivacyPolicy
func (d *MCDelegate) UpdatePrivacyPolicy(r *PrivacyPolicy) *Response {
var uartn Response
var uprtn Response
aJSON, err := json.Marshal(r)
if err == nil {
rq, err := d.buildRequest(http.MethodPut, "/rs/privacyPolicy/update", aJSON, adminKey)
if err == nil {
usuc, stat := d.proxy.Do(rq, &uartn)
uartn.Code = int64(stat)
usuc, stat := d.proxy.Do(rq, &uprtn)
uprtn.Code = int64(stat)
d.Log.Debug("suc: ", usuc)
d.Log.Debug("stat: ", stat)
}
}
d.Log.Debug("rtn: ", uartn)
return &uartn
d.Log.Debug("rtn: ", uprtn)
return &uprtn
}

// GetPrivacyPolicy GetPrivacyPolicy
Expand Down

0 comments on commit f799bd1

Please sign in to comment.