]> source.dussan.org Git - gitea.git/commit
Use db.Find instead of writing methods for every object (#28084)
authorLunny Xiao <xiaolunwen@gmail.com>
Fri, 24 Nov 2023 03:49:41 +0000 (11:49 +0800)
committerGitHub <noreply@github.com>
Fri, 24 Nov 2023 03:49:41 +0000 (03:49 +0000)
commitdf1e7d0067bb39913eb681ccc920649884fb1938
tree2419feab5c28658adb7f71878df646bdc9bdc50e
parentd24a8223ce1e47a0c9b103aae07f67c3112ca048
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.
88 files changed:
cmd/admin_auth.go
models/actions/artifact.go
models/actions/run.go
models/actions/run_job_list.go
models/actions/run_list.go
models/actions/runner.go
models/actions/schedule_list.go
models/actions/schedule_spec_list.go
models/actions/task_list.go
models/actions/variable.go
models/activities/notification.go
models/activities/notification_test.go
models/activities/statistic.go
models/asymkey/ssh_key.go
models/asymkey/ssh_key_commit_verification.go
models/asymkey/ssh_key_deploy.go
models/auth/access_token.go
models/auth/access_token_test.go
models/auth/oauth2.go
models/auth/oauth2_list.go [new file with mode: 0644]
models/auth/source.go
models/db/context.go
models/db/list.go
models/db/list_test.go
models/issues/comment.go
models/organization/org.go
models/organization/org_test.go
models/project/project.go
models/project/project_test.go
models/secret/secret.go
models/user/external_login_user.go
models/webhook/webhook.go
models/webhook/webhook_test.go
routers/api/actions/artifacts.go
routers/api/actions/artifacts_chunks.go
routers/api/actions/runner/utils.go
routers/api/v1/notify/notifications.go
routers/api/v1/notify/repo.go
routers/api/v1/notify/user.go
routers/api/v1/org/action.go
routers/api/v1/org/org.go
routers/api/v1/repo/hook.go
routers/api/v1/repo/key.go
routers/api/v1/user/app.go
routers/api/v1/user/key.go
routers/api/v1/utils/hook.go
routers/web/admin/applications.go
routers/web/admin/auths.go
routers/web/admin/users.go
routers/web/org/projects.go
routers/web/org/setting.go
routers/web/org/setting_oauth2.go
routers/web/repo/actions/actions.go
routers/web/repo/actions/view.go
routers/web/repo/issue.go
routers/web/repo/projects.go
routers/web/repo/setting/deploy_key.go
routers/web/repo/setting/webhook.go
routers/web/shared/actions/runners.go
routers/web/shared/actions/variables.go
routers/web/shared/secrets/secrets.go
routers/web/shared/user/header.go
routers/web/user/home.go
routers/web/user/notification.go
routers/web/user/setting/applications.go
routers/web/user/setting/keys.go
routers/web/user/setting/profile.go
routers/web/user/setting/security/security.go
routers/web/user/setting/webhooks.go
services/actions/clear_tasks.go
services/actions/job_emitter.go
services/actions/notifier_helper.go
services/asymkey/ssh_key_test.go
services/auth/httpsign.go
services/auth/signin.go
services/auth/source/oauth2/init.go
services/auth/source/oauth2/providers.go
services/auth/sspi.go
services/auth/sync.go
services/migrations/update.go
services/pull/review.go
services/repository/delete.go
services/repository/hooks.go
services/secrets/secrets.go
services/user/user.go
services/webhook/webhook.go
tests/integration/auth_ldap_test.go
tests/integration/org_count_test.go