refactor(bug-list): default to open bugs

Amolith created

Change summary

pkg/web/templates/bugs.html | 2 +-
pkg/web/webui_bugs.go       | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Detailed changes

pkg/web/templates/bugs.html 🔗

@@ -4,9 +4,9 @@
 
   <nav aria-label="Bug status filter">
     <ul>
-      <li><a href="/{{.Repo.Name}}/bugs?status=all"{{if eq .Status "all"}} aria-current="page"{{end}}>All</a></li>
       <li><a href="/{{.Repo.Name}}/bugs?status=open"{{if eq .Status "open"}} aria-current="page"{{end}}>Open</a></li>
       <li><a href="/{{.Repo.Name}}/bugs?status=closed"{{if eq .Status "closed"}} aria-current="page"{{end}}>Closed</a></li>
+      <li><a href="/{{.Repo.Name}}/bugs?status=all"{{if eq .Status "all"}} aria-current="page"{{end}}>All</a></li>
     </ul>
   </nav>
 

pkg/web/webui_bugs.go 🔗

@@ -324,10 +324,10 @@ func repoBugs(w http.ResponseWriter, r *http.Request) {
 
 	status := r.URL.Query().Get("status")
 	if status == "" {
-		status = "all"
+		status = "open"
 	}
 	if status != "all" && status != "open" && status != "closed" {
-		status = "all"
+		status = "open"
 	}
 
 	page := 1