aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-05 17:39:29 -0500
committerUnknwon <u@gogs.io>2015-12-05 17:39:29 -0500
commitca8ce793d15b3991eb4766939e9a0a7cf086fa6f (patch)
tree9460c1e8b16d59d31834a4cda12f821a5372f112 /routers/api/v1/admin
parent978dc00305f1af705ae8900977529bac6fa4c72b (diff)
downloadgitea-ca8ce793d15b3991eb4766939e9a0a7cf086fa6f.tar.gz
gitea-ca8ce793d15b3991eb4766939e9a0a7cf086fa6f.zip
#2063 Ability to delete repo from admin panel
Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r--routers/api/v1/admin/users.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/api/v1/admin/users.go b/routers/api/v1/admin/users.go
index c203a09a10..1252ebbf49 100644
--- a/routers/api/v1/admin/users.go
+++ b/routers/api/v1/admin/users.go
@@ -36,6 +36,7 @@ func parseLoginSource(ctx *middleware.Context, u *models.User, sourceID int64, l
u.LoginName = loginName
}
+// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-new-user
func CreateUser(ctx *middleware.Context, form api.CreateUserOption) {
u := &models.User{
Name: form.Username,
@@ -71,6 +72,7 @@ func CreateUser(ctx *middleware.Context, form api.CreateUserOption) {
ctx.JSON(201, to.ApiUser(u))
}
+// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user
func EditUser(ctx *middleware.Context, form api.EditUserOption) {
u := user.GetUserByParams(ctx)
if ctx.Written() {
@@ -119,6 +121,7 @@ func EditUser(ctx *middleware.Context, form api.EditUserOption) {
ctx.JSON(200, to.ApiUser(u))
}
+// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user
func DeleteUser(ctx *middleware.Context) {
u := user.GetUserByParams(ctx)
if ctx.Written() {
@@ -139,6 +142,7 @@ func DeleteUser(ctx *middleware.Context) {
ctx.Status(204)
}
+// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-public-key-for-user
func CreatePublicKey(ctx *middleware.Context, form api.CreateKeyOption) {
u := user.GetUserByParams(ctx)
if ctx.Written() {