Skip to content

Commit

Permalink
Fix #240 Change the response for update organisation endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
albinpa authored and georgepadayatti committed Oct 17, 2023
1 parent f77573c commit b819c03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/v2/handler/updateorganization_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ type orgUpdateReq struct {
PolicyURL string `json:"policyUrl"`
}

type updateOrgResp struct {
Organization organizationResp `json:"organisation"`
}

// UpdateOrganization Updates an organization
func UpdateOrganization(w http.ResponseWriter, r *http.Request) {
var orgUpReq orgUpdateReq
Expand Down Expand Up @@ -71,6 +75,6 @@ func UpdateOrganization(w http.ResponseWriter, r *http.Request) {
}
w.WriteHeader(http.StatusOK)
w.Header().Set(config.ContentTypeHeader, config.ContentTypeJSON)
response, _ := json.Marshal(oResp)
response, _ := json.Marshal(updateOrgResp{oResp})
w.Write(response)
}

0 comments on commit b819c03

Please sign in to comment.