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/admin | |
parent | cb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff) | |
download | gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip |
Rename module: middleware -> context
Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r-- | routers/api/v1/admin/orgs.go | 4 | ||||
-rw-r--r-- | routers/api/v1/admin/repos.go | 4 | ||||
-rw-r--r-- | routers/api/v1/admin/users.go | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/routers/api/v1/admin/orgs.go b/routers/api/v1/admin/orgs.go index 5b5302ca15..fbfcd400ae 100644 --- a/routers/api/v1/admin/orgs.go +++ b/routers/api/v1/admin/orgs.go @@ -8,13 +8,13 @@ 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" ) // https://github.com/gogits/go-gogs-client/wiki/Administration-Organizations#create-a-new-organization -func CreateOrg(ctx *middleware.Context, form api.CreateOrgOption) { +func CreateOrg(ctx *context.Context, form api.CreateOrgOption) { u := user.GetUserByParams(ctx) if ctx.Written() { return diff --git a/routers/api/v1/admin/repos.go b/routers/api/v1/admin/repos.go index 7a6b2af20b..27f46c51c5 100644 --- a/routers/api/v1/admin/repos.go +++ b/routers/api/v1/admin/repos.go @@ -7,13 +7,13 @@ package admin 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/repo" "github.com/gogits/gogs/routers/api/v1/user" ) // https://github.com/gogits/go-gogs-client/wiki/Administration-Repositories#create-a-new-repository -func CreateRepo(ctx *middleware.Context, form api.CreateRepoOption) { +func CreateRepo(ctx *context.Context, form api.CreateRepoOption) { owner := user.GetUserByParams(ctx) if ctx.Written() { return diff --git a/routers/api/v1/admin/users.go b/routers/api/v1/admin/users.go index 9a8c906f29..f0a6c293e5 100644 --- a/routers/api/v1/admin/users.go +++ b/routers/api/v1/admin/users.go @@ -8,15 +8,15 @@ import ( api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/models" + "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/mailer" - "github.com/gogits/gogs/modules/middleware" "github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" ) -func parseLoginSource(ctx *middleware.Context, u *models.User, sourceID int64, loginName string) { +func parseLoginSource(ctx *context.Context, u *models.User, sourceID int64, loginName string) { if sourceID == 0 { return } @@ -37,7 +37,7 @@ func parseLoginSource(ctx *middleware.Context, u *models.User, sourceID int64, l } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-new-user -func CreateUser(ctx *middleware.Context, form api.CreateUserOption) { +func CreateUser(ctx *context.Context, form api.CreateUserOption) { u := &models.User{ Name: form.Username, Email: form.Email, @@ -73,7 +73,7 @@ func CreateUser(ctx *middleware.Context, form api.CreateUserOption) { } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user -func EditUser(ctx *middleware.Context, form api.EditUserOption) { +func EditUser(ctx *context.Context, form api.EditUserOption) { u := user.GetUserByParams(ctx) if ctx.Written() { return @@ -122,7 +122,7 @@ func EditUser(ctx *middleware.Context, form api.EditUserOption) { } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user -func DeleteUser(ctx *middleware.Context) { +func DeleteUser(ctx *context.Context) { u := user.GetUserByParams(ctx) if ctx.Written() { return @@ -143,7 +143,7 @@ func DeleteUser(ctx *middleware.Context) { } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-public-key-for-user -func CreatePublicKey(ctx *middleware.Context, form api.CreateKeyOption) { +func CreatePublicKey(ctx *context.Context, form api.CreateKeyOption) { u := user.GetUserByParams(ctx) if ctx.Written() { return |