summaryrefslogtreecommitdiffstats
path: root/routers/repo/single.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/single.go')
-rw-r--r--routers/repo/single.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go
index 0bf3454530..396c9455b9 100644
--- a/routers/repo/single.go
+++ b/routers/repo/single.go
@@ -52,7 +52,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
files, err := models.GetReposFiles(params["username"], params["reponame"],
params["branchname"], treename)
if err != nil {
- ctx.Render.Error(404)
+ ctx.Handle(200, "repo.Single", err)
return
}
ctx.Data["Username"] = params["username"]
@@ -62,7 +62,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
// Branches.
brs, err := models.GetBranches(params["username"], params["reponame"])
if err != nil {
- ctx.Render.Error(404)
+ ctx.Handle(200, "repo.Single", err)
return
}
ctx.Data["Branches"] = brs
@@ -80,7 +80,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
// Get latest commit according username and repo name
commit, err := models.GetLastestCommit(params["username"], params["reponame"])
if err != nil {
- ctx.Render.Error(404)
+ ctx.Handle(200, "repo.Single", err)
return
}
ctx.Data["LatestCommit"] = commit