|
@@ -5,15 +5,14 @@
|
|
|
package repo
|
|
|
|
|
|
import (
|
|
|
-
|
|
|
api "github.com/gogits/go-gogs-client"
|
|
|
|
|
|
"github.com/gogits/gogs/modules/middleware"
|
|
|
"github.com/gogits/gogs/routers/api/v1/convert"
|
|
|
)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
func GetBranch(ctx *middleware.Context) {
|
|
|
branch, err := ctx.Repo.Repository.GetBranch(ctx.Params(":id"))
|
|
|
if err != nil {
|
|
@@ -28,11 +27,9 @@ func GetBranch(ctx *middleware.Context) {
|
|
|
ctx.JSON(200, convert.ToApiBranch(branch,c))
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
func ListBranches(ctx *middleware.Context) {
|
|
|
-
|
|
|
-
|
|
|
Branches, err := ctx.Repo.Repository.GetBranches()
|
|
|
if err != nil {
|
|
|
|