diff options
author | Unknwon <u@gogs.io> | 2016-03-13 23:20:22 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-13 23:20:22 -0400 |
commit | 9bd9ad420582a7a34d18011847bb789f64271b1f (patch) | |
tree | 05b1191897ed5f56395faacd3c8bf1ab00a14c9c /routers/api/v1/admin | |
parent | dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 (diff) | |
download | gitea-9bd9ad420582a7a34d18011847bb789f64271b1f.tar.gz gitea-9bd9ad420582a7a34d18011847bb789f64271b1f.zip |
#1692 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to #809
Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r-- | routers/api/v1/admin/orgs.go | 2 | ||||
-rw-r--r-- | routers/api/v1/admin/users.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/admin/orgs.go b/routers/api/v1/admin/orgs.go index 1e7ad15657..fcce3b9314 100644 --- a/routers/api/v1/admin/orgs.go +++ b/routers/api/v1/admin/orgs.go @@ -40,5 +40,5 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) { return } - ctx.JSON(201, convert.ToApiOrganization(org)) + ctx.JSON(201, convert.ToOrganization(org)) } diff --git a/routers/api/v1/admin/users.go b/routers/api/v1/admin/users.go index 50409cff94..ce13804ffb 100644 --- a/routers/api/v1/admin/users.go +++ b/routers/api/v1/admin/users.go @@ -69,7 +69,7 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { mailer.SendRegisterNotifyMail(ctx.Context.Context, u) } - ctx.JSON(201, convert.ToApiUser(u)) + ctx.JSON(201, convert.ToUser(u)) } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user @@ -118,7 +118,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.ToApiUser(u)) + ctx.JSON(200, convert.ToUser(u)) } // https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user |