diff options
author | Unknwon <u@gogs.io> | 2016-08-14 04:17:26 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-14 04:17:26 -0700 |
commit | dccb0c15b996ac4dc0307cbfed140ce1558d7e3c (patch) | |
tree | 97593eae3a1023296c2c03258e6bc4ae4c02b6bf /routers/api/v1/admin/user.go | |
parent | 3f7f4852efaaa56a0dada832dc652a1fc8869ae7 (diff) | |
download | gitea-dccb0c15b996ac4dc0307cbfed140ce1558d7e3c.tar.gz gitea-dccb0c15b996ac4dc0307cbfed140ce1558d7e3c.zip |
Replace convert.To with APIFormat calls
Diffstat (limited to 'routers/api/v1/admin/user.go')
-rw-r--r-- | routers/api/v1/admin/user.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index bbf069108c..ca3d67adbf 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -11,7 +11,6 @@ import ( "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/setting" - "github.com/gogits/gogs/routers/api/v1/convert" "github.com/gogits/gogs/routers/api/v1/user" ) @@ -69,7 +68,7 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { models.SendRegisterNotifyMail(ctx.Context.Context, u) } - ctx.JSON(201, convert.ToUser(u)) + ctx.JSON(201, u.APIFormat()) } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user @@ -121,7 +120,7 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { } log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name) - ctx.JSON(200, convert.ToUser(u)) + ctx.JSON(200, u.APIFormat()) } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user |