add commits
This commit is contained in:
parent
be8baea7ad
commit
45a6444b1e
4 changed files with 26 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue