diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-11-18 18:42:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 01:42:27 +0800 |
commit | f34151bdb22c8160b0a6eafef20725ebae1768da (patch) | |
tree | 2abcc5845e4a9cf3769deb27ba5a3ecccd2ad8c9 /routers/web/admin/users.go | |
parent | 55be5fe3399d18b7d2477519707aecf5f99f1de5 (diff) | |
download | gitea-f34151bdb22c8160b0a6eafef20725ebae1768da.tar.gz gitea-f34151bdb22c8160b0a6eafef20725ebae1768da.zip |
Move user/org deletion to services (#17673)
Diffstat (limited to 'routers/web/admin/users.go')
-rw-r--r-- | routers/web/admin/users.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go index 93e59893e9..b23e4cf39b 100644 --- a/routers/web/admin/users.go +++ b/routers/web/admin/users.go @@ -26,6 +26,7 @@ import ( router_user_setting "code.gitea.io/gitea/routers/web/user/setting" "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/mailer" + "code.gitea.io/gitea/services/user" ) const ( @@ -377,7 +378,7 @@ func DeleteUser(ctx *context.Context) { return } - if err = models.DeleteUser(u); err != nil { + if err = user.DeleteUser(u); err != nil { switch { case models.IsErrUserOwnRepos(err): ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo")) |