mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 17:24:22 +00: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:
		@@ -1530,6 +1530,7 @@ func Routes() *web.Router {
 | 
			
		||||
			m.Combo("").Get(org.Get).
 | 
			
		||||
				Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit).
 | 
			
		||||
				Delete(reqToken(), reqOrgOwnership(), org.Delete)
 | 
			
		||||
			m.Post("/rename", reqToken(), reqOrgOwnership(), bind(api.RenameOrgOption{}), org.Rename)
 | 
			
		||||
			m.Combo("/repos").Get(user.ListOrgRepos).
 | 
			
		||||
				Post(reqToken(), bind(api.CreateRepoOption{}), repo.CreateOrgRepo)
 | 
			
		||||
			m.Group("/members", func() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user