From 68179dc67695def5fd7400bed1231e4bc0d2cc09 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Thu, 7 Dec 2017 17:02:34 -0800 Subject: Remove unnecessary function call (#3109) --- routers/user/home.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'routers/user') 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" } } -- cgit v1.2.3