fix: handle "_" as default repo in HTTP handlers

Quentin Gliech and Claude Opus 4.6 (1M context) created

The webui uses "_" as the URL slug for the default repository. Add it
alongside "" in the gitfile and upload handler switch cases so they
resolve to DefaultRepo() correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Change summary

api/http/git_file_handler.go        | 2 +-
api/http/git_file_upload_handler.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Detailed changes

api/http/git_file_handler.go 🔗

@@ -40,7 +40,7 @@ func (gfh *gitFileHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
 	var err error
 
 	switch repoVar := vars["repo"]; repoVar {
-	case "":
+	case "", "_":
 		repo, err = gfh.mrc.DefaultRepo()
 	default:
 		repo, err = gfh.mrc.ResolveRepo(repoVar)

api/http/git_file_upload_handler.go 🔗

@@ -30,7 +30,7 @@ func (gufh *gitUploadFileHandler) ServeHTTP(rw http.ResponseWriter, r *http.Requ
 
 	repoVar := mux.Vars(r)["repo"]
 	switch repoVar {
-	case "":
+	case "", "_":
 		repo, err = gufh.mrc.DefaultRepo()
 	default:
 		repo, err = gufh.mrc.ResolveRepo(repoVar)