Skip to content

Commit

Permalink
Fix #231 Update organisation response should include organisation and…
Browse files Browse the repository at this point in the history
… status code is changed 200
  • Loading branch information
albinpa authored and georgepadayatti committed Oct 12, 2023
1 parent 261c5bd commit 7c5ba07
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/config
17 changes: 16 additions & 1 deletion src/handlerv2/updateorganization_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,20 @@ func UpdateOrganization(w http.ResponseWriter, r *http.Request) {
return
}
go user.UpdateOrganizationsSubscribedUsers(orgResp)
w.WriteHeader(http.StatusAccepted)

oResp := organizationResp{
ID: orgResp.ID,
Name: orgResp.Name,
Description: orgResp.Description,
Location: orgResp.Location,
PolicyURL: orgResp.PolicyURL,
CoverImageID: orgResp.CoverImageID,
CoverImageURL: orgResp.CoverImageURL,
LogoImageID: orgResp.LogoImageID,
LogoImageURL: orgResp.LogoImageURL,
}
w.WriteHeader(http.StatusOK)
w.Header().Set(config.ContentTypeHeader, config.ContentTypeJSON)
response, _ := json.Marshal(oResp)
w.Write(response)
}

0 comments on commit 7c5ba07

Please sign in to comment.