forked from forgejo/forgejo
update git api. fix link... and so on
This commit is contained in:
parent
41ca0ed302
commit
b27c34f39a
11 changed files with 63 additions and 91 deletions
|
@ -11,21 +11,15 @@ import (
|
|||
)
|
||||
|
||||
func Branches(ctx *middleware.Context, params martini.Params) {
|
||||
if !ctx.Repo.IsValid {
|
||||
return
|
||||
}
|
||||
|
||||
brs, err := models.GetBranches(params["username"], params["reponame"])
|
||||
brs, err := models.GetBranches(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name)
|
||||
if err != nil {
|
||||
ctx.Handle(200, "repo.Branches", err)
|
||||
ctx.Handle(404, "repo.Branches", err)
|
||||
return
|
||||
} else if len(brs) == 0 {
|
||||
ctx.Handle(404, "repo.Branches", nil)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["Username"] = params["username"]
|
||||
ctx.Data["Reponame"] = params["reponame"]
|
||||
ctx.Data["Branches"] = brs
|
||||
ctx.Data["IsRepoToolbarBranches"] = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue