Skip to content

Commit

Permalink
Merge pull request #1496 from Vayras/master
Browse files Browse the repository at this point in the history
removed description restrictions from org
  • Loading branch information
elraphty authored Feb 7, 2024
2 parents e702c46 + 5cdabe7 commit 4640360
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion handlers/organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func TestUnitCreateOrEditOrganization(t *testing.T) {
description string
wantStatus int
}{
{"empty description", "", http.StatusBadRequest},
{"long description", strings.Repeat("a", 121), http.StatusBadRequest},
}

Expand Down
4 changes: 2 additions & 2 deletions handlers/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func (oh *organizationHandler) CreateOrEditOrganization(w http.ResponseWriter, r
return
}

if len(org.Description) == 0 || len(org.Description) > 120 {
if len(org.Description) > 120 {
fmt.Printf("invalid organization name %s\n", org.Description)
w.WriteHeader(http.StatusBadRequest)
json.NewEncoder(w).Encode("Error: organization description must be present and should not exceed 120 character")
json.NewEncoder(w).Encode("Error: organization description should not exceed 120 character")
return
}

Expand Down

0 comments on commit 4640360

Please sign in to comment.