diff options
author | Unknwon <u@gogs.io> | 2015-12-17 02:28:47 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-17 02:28:47 -0500 |
commit | 9cd16c5b12d093dd694e146d6c845ee4c405c774 (patch) | |
tree | d9f1a037ba8ecbc3e5fe2f15f0baec6dec6242b4 /routers/api/v1/admin/users.go | |
parent | 6673dcb0380aa99da25b4d1d68cf129635fe30d9 (diff) | |
download | gitea-9cd16c5b12d093dd694e146d6c845ee4c405c774.tar.gz gitea-9cd16c5b12d093dd694e146d6c845ee4c405c774.zip |
#1692 add organization APIs
Diffstat (limited to 'routers/api/v1/admin/users.go')
-rw-r--r-- | routers/api/v1/admin/users.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/admin/users.go b/routers/api/v1/admin/users.go index 1bd253681b..9a8c906f29 100644 --- a/routers/api/v1/admin/users.go +++ b/routers/api/v1/admin/users.go @@ -12,8 +12,8 @@ import ( "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" - to "github.com/gogits/gogs/routers/api/v1/utils" ) func parseLoginSource(ctx *middleware.Context, u *models.User, sourceID int64, loginName string) { @@ -69,7 +69,7 @@ func CreateUser(ctx *middleware.Context, form api.CreateUserOption) { mailer.SendRegisterNotifyMail(ctx.Context, u) } - ctx.JSON(201, to.ApiUser(u)) + ctx.JSON(201, convert.ToApiUser(u)) } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user @@ -118,7 +118,7 @@ func EditUser(ctx *middleware.Context, form api.EditUserOption) { } log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name) - ctx.JSON(200, to.ApiUser(u)) + ctx.JSON(200, convert.ToApiUser(u)) } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user |