aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/single.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/single.go')
-rw-r--r--routers/repo/single.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go
index cf64cc6b..eda71f29 100644
--- a/routers/repo/single.go
+++ b/routers/repo/single.go
@@ -131,8 +131,15 @@ func Setting(ctx *middleware.Context, params martini.Params) {
ctx.Render.HTML(200, "repo/setting", ctx.Data)
}
-func Commits(ctx *middleware.Context) {
+func Commits(ctx *middleware.Context, params martini.Params) {
ctx.Data["IsRepoToolbarCommits"] = true
+ commits, err := models.GetCommits(params["username"],
+ params["reponame"], params["branchname"])
+ if err != nil {
+ ctx.Render.Error(404)
+ return
+ }
+ ctx.Data["Commits"] = commits
ctx.Render.HTML(200, "repo/commits", ctx.Data)
}