summaryrefslogtreecommitdiffstats
path: root/services/user/delete.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-01-15 10:19:25 +0800
committerGitHub <noreply@github.com>2024-01-15 02:19:25 +0000
commit70c4aad8e1cbc46b049b015dcd6f2e5be5a69e72 (patch)
tree5c9f049437c1a84a402aeef3be0cb4b95dea667e /services/user/delete.go
parente5313248a8ed967a915f072d3991b6d046badf02 (diff)
downloadgitea-70c4aad8e1cbc46b049b015dcd6f2e5be5a69e72.tar.gz
gitea-70c4aad8e1cbc46b049b015dcd6f2e5be5a69e72.zip
Move more functions to db.Find (#28419)
Following #28220 This PR move more functions to use `db.Find`. --------- Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'services/user/delete.go')
-rw-r--r--services/user/delete.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/user/delete.go b/services/user/delete.go
index 748f5c2d1e..0e9c866171 100644
--- a/services/user/delete.go
+++ b/services/user/delete.go
@@ -159,7 +159,9 @@ func deleteUser(ctx context.Context, u *user_model.User, purge bool) (err error)
// ***** END: PublicKey *****
// ***** START: GPGPublicKey *****
- keys, err := asymkey_model.ListGPGKeys(ctx, u.ID, db.ListOptions{})
+ keys, err := db.Find[asymkey_model.GPGKey](ctx, asymkey_model.FindGPGKeyOptions{
+ OwnerID: u.ID,
+ })
if err != nil {
return fmt.Errorf("ListGPGKeys: %w", err)
}