diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-11-24 04:49:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 04:49:41 +0100 |
commit | df1e7d0067bb39913eb681ccc920649884fb1938 (patch) | |
tree | 2419feab5c28658adb7f71878df646bdc9bdc50e /services/user | |
parent | Edit Discord Badge (#28188) (diff) | |
download | forgejo-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.go | 2 |
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, |