aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/pull_review.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/pull_review.go')
-rw-r--r--routers/web/repo/pull_review.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/web/repo/pull_review.go b/routers/web/repo/pull_review.go
index fb92d24394..929e131d61 100644
--- a/routers/web/repo/pull_review.go
+++ b/routers/web/repo/pull_review.go
@@ -209,11 +209,12 @@ func renderConversation(ctx *context.Context, comment *issues_model.Comment, ori
return user_service.CanBlockUser(ctx, ctx.Doer, blocker, blockee)
}
- if origin == "diff" {
+ switch origin {
+ case "diff":
ctx.HTML(http.StatusOK, tplDiffConversation)
- } else if origin == "timeline" {
+ case "timeline":
ctx.HTML(http.StatusOK, tplTimelineConversation)
- } else {
+ default:
ctx.HTTPError(http.StatusBadRequest, "Unknown origin: "+origin)
}
}