Skip to content

Commit 58a6a08

Browse files
committed
fix unnecessary argument
1 parent ed38cdc commit 58a6a08

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

routers/web/admin/config.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ func Config(ctx *context.Context) {
188188
ctx.Data["EnableXORMLog"] = setting.EnableXORMLog
189189
ctx.Data["LogSQL"] = setting.Database.LogSQL
190190

191-
editors, err := dev.GetEditors()
192-
if err != nil {
193-
ctx.ServerError("system_model.GetAllSettings", err)
194-
return
195-
}
191+
editors := dev.GetEditors()
196192

197193
defaultEditorS := systemSettings.Get(dev.KeyDevDefaultEditors)
198194
if defaultEditorS.SettingValue == "" {

routers/web/user/setting/profile.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,7 @@ func Appearance(ctx *context.Context) {
376376
return forms.IsUserHiddenCommentTypeGroupChecked(commentTypeGroup, hiddenCommentTypes)
377377
}
378378

379-
editors, err := dev.GetEditors()
380-
if err != nil {
381-
ctx.ServerError("dev.GetEditors", err)
382-
return
383-
}
379+
editors := dev.GetEditors()
384380

385381
myDefaultEditors, err := dev.GetUserDefaultEditorsWithFallback(ctx.Doer)
386382
if err != nil {

services/dev/editor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func GetEditorsByNames(names []string) []*Editor {
6464
}
6565

6666
// GetEditors returns all editors
67-
func GetEditors() ([]Editor, error) {
68-
return defaultEditors, nil
67+
func GetEditors() []Editor {
68+
return defaultEditors
6969
}
7070

7171
func DefaultEditorsNames() string {

0 commit comments

Comments
 (0)