Skip to content

Commit 6dac5a4

Browse files
committed
follow wxiaoguang's suggestion
1 parent ecc5b72 commit 6dac5a4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

routers/web/org/setting.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@ func SettingsChangeVisibilityPost(ctx *context.Context) {
246246

247247
if err := org_service.ChangeOrganizationVisibility(ctx, ctx.Org.Organization, visibility); err != nil {
248248
log.Error("ChangeOrganizationVisibility: %v", err)
249-
ctx.JSON(http.StatusInternalServerError, map[string]any{
250-
"err": http.StatusText(http.StatusInternalServerError),
251-
})
249+
ctx.JSONError(ctx.Tr("error.occurred"))
252250
return
253251
}
254252

0 commit comments

Comments
 (0)