aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2023-03-14 03:45:21 -0400
committerGitHub <noreply@github.com>2023-03-14 03:45:21 -0400
commit03591f0f95823a0b1dcca969d2a3ed505c7e6d73 (patch)
tree0117b3cf1f27b4f0f7a0346fcf724fa3af0e3f8f /routers/api/v1/api.go
parentaac07d010f261c00fb3bd9644c71dc108c668c11 (diff)
downloadgitea-03591f0f95823a0b1dcca969d2a3ed505c7e6d73.tar.gz
gitea-03591f0f95823a0b1dcca969d2a3ed505c7e6d73.zip
add user rename endpoint to admin api (#22789)
this is a simple endpoint that adds the ability to rename users to the admin API. Note: this is not in a mergeable state. It would be better if this was handled by a PATCH/POST to the /api/v1/admin/users/{username} endpoint and the username is modified. --------- Co-authored-by: Jason Song <i@wolfogre.com>
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 735939a551..7001dc72ac 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -1257,6 +1257,7 @@ func Routes(ctx gocontext.Context) *web.Route {
m.Get("/orgs", org.ListUserOrgs)
m.Post("/orgs", bind(api.CreateOrgOption{}), admin.CreateOrg)
m.Post("/repos", bind(api.CreateRepoOption{}), admin.CreateRepo)
+ m.Post("/rename", bind(api.RenameUserOption{}), admin.RenameUser)
}, context_service.UserAssignmentAPI())
})
m.Group("/unadopted", func() {