summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-12-07 17:02:34 -0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-12-08 09:02:34 +0800
commit68179dc67695def5fd7400bed1231e4bc0d2cc09 (patch)
tree23d86abf80cd07c69c780aa8ebcb7d2fa89931d1 /routers/user
parent5e4427e4e7178589b74a8b1a4d581eb8009d3cc8 (diff)
downloadgitea-68179dc67695def5fd7400bed1231e4bc0d2cc09.tar.gz
gitea-68179dc67695def5fd7400bed1231e4bc0d2cc09.zip
Remove unnecessary function call (#3109)
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/home.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 581db850f6..756da4f57f 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -9,7 +9,6 @@ import (
"fmt"
"sort"
- "github.com/Unknwon/com"
"github.com/Unknwon/paginater"
"code.gitea.io/gitea/models"
@@ -192,18 +191,14 @@ func Issues(ctx *context.Context) {
viewType = "all"
} else {
viewType = ctx.Query("type")
- types := []string{"all", "assigned", "created_by"}
- if !com.IsSliceContainsStr(types, viewType) {
- viewType = "all"
- }
-
switch viewType {
- case "all":
- filterMode = models.FilterModeAll
case "assigned":
filterMode = models.FilterModeAssign
case "created_by":
filterMode = models.FilterModeCreate
+ case "all": // filterMode already set to All
+ default:
+ viewType = "all"
}
}