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/admin/orgs.go | |
parent | cb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff) | |
download | gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip |
Rename module: middleware -> context
Diffstat (limited to 'routers/admin/orgs.go')
-rw-r--r-- | routers/admin/orgs.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/admin/orgs.go b/routers/admin/orgs.go index ae68b872d0..829e78e83c 100644 --- a/routers/admin/orgs.go +++ b/routers/admin/orgs.go @@ -9,7 +9,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/middleware" + "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/setting" ) @@ -17,7 +17,7 @@ const ( ORGS base.TplName = "admin/org/list" ) -func Organizations(ctx *middleware.Context) { +func Organizations(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("admin.organizations") ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdminOrganizations"] = true @@ -28,15 +28,15 @@ func Organizations(ctx *middleware.Context) { page = 1 } ctx.Data["Page"] = paginater.New(int(total), setting.AdminOrgPagingNum, page, 5) - - orgs, err := models.Organizations(page, setting.AdminOrgPagingNum) - + + orgs, err := models.Organizations(page, setting.AdminOrgPagingNum) + if err != nil { ctx.Handle(500, "Organizations", err) return } - - ctx.Data["Orgs"] = orgs + + ctx.Data["Orgs"] = orgs ctx.Data["Total"] = total ctx.HTML(200, ORGS) |