Skip to content

Commit

Permalink
Fix #390 Api crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
albinpa authored and georgepadayatti committed Oct 27, 2023
1 parent b8a24da commit 0369d30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/v1/handler/organization_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ func UpdateOrganizationCoverImage(w http.ResponseWriter, r *http.Request) {
return
}

imageURL := "https://" + r.Host + "/v1/organizations/" + organizationID + "/image/" + imageID
o, err := org.UpdateCoverImage(organizationID, imageID, imageURL)
o, err := org.UpdateCoverImage(organizationID, imageID)
if err != nil {
m := fmt.Sprintf("Failed to update organization: %v with image: %v details", organizationID, imageID)
common.HandleError(w, http.StatusInternalServerError, m, err)
Expand Down Expand Up @@ -253,8 +252,7 @@ func UpdateOrganizationLogoImage(w http.ResponseWriter, r *http.Request) {
return
}

imageURL := "https://" + r.Host + "/v1/organizations/" + organizationID + "/image/" + imageID
o, err := org.UpdateLogoImage(organizationID, imageID, imageURL)
o, err := org.UpdateLogoImage(organizationID, imageID)
if err != nil {
m := fmt.Sprintf("Failed to update organization: %v with image: %v details", organizationID, imageID)
common.HandleError(w, http.StatusInternalServerError, m, err)
Expand Down

0 comments on commit 0369d30

Please sign in to comment.