diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-03-05 12:13:56 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-03-05 11:25:19 +0000 |
| commit | 18c4803efdcc256364c4dcfd9eca5176e277844f (patch) | |
| tree | 52bfdef8c1d2d20e5159af3e0120dffcf5e3a5b3 /dashboard/app/main.go | |
| parent | 9ed46f6427103800294851039efc208dca8b80fb (diff) | |
all: fix json=0 error
Currently json=0 and json=1 give the same result.
Diffstat (limited to 'dashboard/app/main.go')
| -rw-r--r-- | dashboard/app/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 7ae2163fe..6e8b34b19 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -533,7 +533,7 @@ func handleMain(c context.Context, w http.ResponseWriter, r *http.Request) error BugFilter: makeUIBugFilter(c, filter), } - if r.FormValue("json") != "" { + if r.FormValue("json") == "1" { w.Header().Set("Content-Type", "application/json") return writeJSONVersionOf(w, data) } @@ -860,7 +860,7 @@ func handleTerminalBugList(c context.Context, w http.ResponseWriter, r *http.Req BugFilter: makeUIBugFilter(c, typ.Filter), } - if r.FormValue("json") != "" { + if r.FormValue("json") == "1" { w.Header().Set("Content-Type", "application/json") return writeJSONVersionOf(w, data) } @@ -1171,7 +1171,7 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error "Cause bisection attempts", uiList)) } } - if r.FormValue("json") != "" { + if r.FormValue("json") == "1" { w.Header().Set("Content-Type", "application/json") return writeJSONVersionOf(w, data) } |
