diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-17 23:04:49 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-17 23:04:49 +0800 |
commit | 45a6444b1ead3ebedcf79204cabe44df672f59d5 (patch) | |
tree | 3aa7e4d1c274d895588f29106282f09b3e862c8c /routers/repo | |
parent | be8baea7ad269eb633a6b5a569b904982021723d (diff) |
add commits
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/single.go | 9 |
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) } |