1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Delete repos of org when purge delete user (#27273)

Fixes https://codeberg.org/forgejo/forgejo/issues/1514

I had to remove `RenameOrganization` to avoid circular import.

We should really add some foreign keys to the database.
This commit is contained in:
JakobDev
2023-10-19 15:16:11 +02:00
committed by GitHub
parent 398eccb322
commit 3dc0c962bf
8 changed files with 67 additions and 41 deletions

View File

@@ -385,7 +385,7 @@ func Delete(ctx *context.APIContext) {
// "404":
// "$ref": "#/responses/notFound"
if err := org.DeleteOrganization(ctx, ctx.Org.Organization); err != nil {
if err := org.DeleteOrganization(ctx, ctx.Org.Organization, false); err != nil {
ctx.Error(http.StatusInternalServerError, "DeleteOrganization", err)
return
}