mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Move user/org deletion to services (#17673)
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
"code.gitea.io/gitea/routers/api/v1/user"
|
||||
"code.gitea.io/gitea/routers/api/v1/utils"
|
||||
"code.gitea.io/gitea/services/org"
|
||||
)
|
||||
|
||||
func listUserOrgs(ctx *context.APIContext, u *models.User) {
|
||||
@@ -364,7 +365,7 @@ func Delete(ctx *context.APIContext) {
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
|
||||
if err := models.DeleteOrganization(ctx.Org.Organization); err != nil {
|
||||
if err := org.DeleteOrganization(ctx.Org.Organization); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "DeleteOrganization", err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user