Remove unnecessary function call (#3109)
This commit is contained in:
parent
5e4427e4e7
commit
68179dc676
1 changed files with 3 additions and 8 deletions
|
@ -9,7 +9,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/Unknwon/com"
|
|
||||||
"github.com/Unknwon/paginater"
|
"github.com/Unknwon/paginater"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models"
|
"code.gitea.io/gitea/models"
|
||||||
|
@ -192,18 +191,14 @@ func Issues(ctx *context.Context) {
|
||||||
viewType = "all"
|
viewType = "all"
|
||||||
} else {
|
} else {
|
||||||
viewType = ctx.Query("type")
|
viewType = ctx.Query("type")
|
||||||
types := []string{"all", "assigned", "created_by"}
|
|
||||||
if !com.IsSliceContainsStr(types, viewType) {
|
|
||||||
viewType = "all"
|
|
||||||
}
|
|
||||||
|
|
||||||
switch viewType {
|
switch viewType {
|
||||||
case "all":
|
|
||||||
filterMode = models.FilterModeAll
|
|
||||||
case "assigned":
|
case "assigned":
|
||||||
filterMode = models.FilterModeAssign
|
filterMode = models.FilterModeAssign
|
||||||
case "created_by":
|
case "created_by":
|
||||||
filterMode = models.FilterModeCreate
|
filterMode = models.FilterModeCreate
|
||||||
|
case "all": // filterMode already set to All
|
||||||
|
default:
|
||||||
|
viewType = "all"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue