1
0
Fork 0
forked from forgejo/forgejo

Move user/org deletion to services (#17673)

This commit is contained in:
KN4CK3R 2021-11-18 18:42:27 +01:00 committed by GitHub
parent 55be5fe339
commit f34151bdb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 382 additions and 301 deletions

View file

@ -26,6 +26,7 @@ import (
auth_service "code.gitea.io/gitea/services/auth"
"code.gitea.io/gitea/services/auth/source/oauth2"
repo_service "code.gitea.io/gitea/services/repository"
user_service "code.gitea.io/gitea/services/user"
"github.com/urfave/cli"
)
@ -534,7 +535,7 @@ func runDeleteUser(c *cli.Context) error {
return fmt.Errorf("The user %s does not match the provided id %d", user.Name, c.Int64("id"))
}
return models.DeleteUser(user)
return user_service.DeleteUser(user)
}
func runRepoSyncReleases(_ *cli.Context) error {