From 514382e2ebfe6869268aeb919c1fa4d224687e13 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 11 Mar 2016 11:56:52 -0500 Subject: Rename module: middleware -> context --- routers/api/v1/repo/branch.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/api/v1/repo/branch.go') diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index e2f15ff5..511f5005 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -7,12 +7,12 @@ package repo import ( api "github.com/gogits/go-gogs-client" - "github.com/gogits/gogs/modules/middleware" + "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/routers/api/v1/convert" ) // https://github.com/gogits/go-gogs-client/wiki/Repositories#get-branch -func GetBranch(ctx *middleware.Context) { +func GetBranch(ctx *context.Context) { branch, err := ctx.Repo.Repository.GetBranch(ctx.Params(":branchname")) if err != nil { ctx.APIError(500, "GetBranch", err) @@ -29,7 +29,7 @@ func GetBranch(ctx *middleware.Context) { } // https://github.com/gogits/go-gogs-client/wiki/Repositories#list-branches -func ListBranches(ctx *middleware.Context) { +func ListBranches(ctx *context.Context) { branches, err := ctx.Repo.Repository.GetBranches() if err != nil { ctx.APIError(500, "GetBranches", err) -- cgit v1.2.3