Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed description restrictions from org #1496

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading