summaryrefslogtreecommitdiffstats
path: root/services/user
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-11-24 04:49:41 +0100
committerGitHub <noreply@github.com>2023-11-24 04:49:41 +0100
commitdf1e7d0067bb39913eb681ccc920649884fb1938 (patch)
tree2419feab5c28658adb7f71878df646bdc9bdc50e /services/user
parentEdit Discord Badge (#28188) (diff)
downloadforgejo-df1e7d0067bb39913eb681ccc920649884fb1938.tar.xz
forgejo-df1e7d0067bb39913eb681ccc920649884fb1938.zip
Use db.Find instead of writing methods for every object (#28084)
For those simple objects, it's unnecessary to write the find and count methods again and again.
Diffstat (limited to 'services/user')
-rw-r--r--services/user/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/user/user.go b/services/user/user.go
index 4a4908fe8e..932e359c9f 100644
--- a/services/user/user.go
+++ b/services/user/user.go
@@ -172,7 +172,7 @@ func DeleteUser(ctx context.Context, u *user_model.User, purge bool) error {
// An alternative option here would be write a function which would delete all organizations but it seems
// but such a function would likely get out of date
for {
- orgs, err := organization.FindOrgs(ctx, organization.FindOrgOptions{
+ orgs, err := db.Find[organization.Organization](ctx, organization.FindOrgOptions{
ListOptions: db.ListOptions{
PageSize: repo_model.RepositoryListDefaultPageSize,
Page: 1,