summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-13 23:20:22 -0400
committerUnknwon <u@gogs.io>2016-03-13 23:20:22 -0400
commit9bd9ad420582a7a34d18011847bb789f64271b1f (patch)
tree05b1191897ed5f56395faacd3c8bf1ab00a14c9c /routers/api/v1/admin
parentdd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 (diff)
downloadgitea-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.go2
-rw-r--r--routers/api/v1/admin/users.go4
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