mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-27 00:23:41 +09:00
Inclusion of rename organization api (#33303)
This adds an endpoint (`/orgs/{org}/rename`) to rename organizations.
I've modeled the endpoint using the rename user endpoint --
`/admin/users/{username}/rename` -- as base.
It is the 1st time I wrote a new API endpoint (I've tried to follow the
rename users endpoint code while writing it). So feel free to ping me if
there is something wrong or missing.
Resolves #32995
---------
Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -57,3 +57,12 @@ type EditOrgOption struct {
|
||||
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
|
||||
RepoAdminChangeTeamAccess *bool `json:"repo_admin_change_team_access"`
|
||||
}
|
||||
|
||||
// RenameOrgOption options when renaming an organization
|
||||
type RenameOrgOption struct {
|
||||
// New username for this org. This name cannot be in use yet by any other user.
|
||||
//
|
||||
// required: true
|
||||
// unique: true
|
||||
NewName string `json:"new_name" binding:"Required"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user