diff options
author | Unknwon <u@gogs.io> | 2016-03-11 11:56:52 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-11 11:56:52 -0500 |
commit | 514382e2ebfe6869268aeb919c1fa4d224687e13 (patch) | |
tree | 1aa8c4b3b1e771a5dc6f0bdd74567961570efcaa /routers/api/v1/org | |
parent | cb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff) | |
download | gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip |
Rename module: middleware -> context
Diffstat (limited to 'routers/api/v1/org')
-rw-r--r-- | routers/api/v1/org/org.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index 2c6d6fd3f8..fe99f10548 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -8,12 +8,12 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/middleware" + "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" ) -func listUserOrgs(ctx *middleware.Context, u *models.User, all bool) { +func listUserOrgs(ctx *context.Context, u *models.User, all bool) { if err := u.GetOrganizations(all); err != nil { ctx.APIError(500, "GetOrganizations", err) return @@ -27,12 +27,12 @@ func listUserOrgs(ctx *middleware.Context, u *models.User, all bool) { } // https://github.com/gogits/go-gogs-client/wiki/Organizations#list-your-organizations -func ListMyOrgs(ctx *middleware.Context) { +func ListMyOrgs(ctx *context.Context) { listUserOrgs(ctx, ctx.User, true) } // https://github.com/gogits/go-gogs-client/wiki/Organizations#list-user-organizations -func ListUserOrgs(ctx *middleware.Context) { +func ListUserOrgs(ctx *context.Context) { u := user.GetUserByParams(ctx) if ctx.Written() { return @@ -41,7 +41,7 @@ func ListUserOrgs(ctx *middleware.Context) { } // https://github.com/gogits/go-gogs-client/wiki/Organizations#get-an-organization -func Get(ctx *middleware.Context) { +func Get(ctx *context.Context) { org := user.GetUserByParamsName(ctx, ":orgname") if ctx.Written() { return @@ -50,7 +50,7 @@ func Get(ctx *middleware.Context) { } // https://github.com/gogits/go-gogs-client/wiki/Organizations#edit-an-organization -func Edit(ctx *middleware.Context, form api.EditOrgOption) { +func Edit(ctx *context.Context, form api.EditOrgOption) { org := user.GetUserByParamsName(ctx, ":orgname") if ctx.Written() { return |