mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-02 13:44:16 +09:00
fix(db): make paginated database reads always require "order" option (#39017)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
0bed1232ee
commit
1c16f04bf5
29 files changed
+161
-65
No files matched your search
@@ -20,6 +20,10 @@ type ListSystemWebhookOptions struct {
|
||||
IsSystem optional.Option[bool]
|
||||
}
|
||||
|
||||
func (opts ListSystemWebhookOptions) ToOrders() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
func (opts ListSystemWebhookOptions) ToConds() builder.Cond {
|
||||
cond := builder.NewCond()
|
||||
cond = cond.And(builder.Eq{"webhook.repo_id": 0}, builder.Eq{"webhook.owner_id": 0})
|
||||
|
||||
Reference in new issue
Block a user