mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-26 02:50:54 +00:00
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>
This commit is contained in:
parent
e5313248a8
commit
70c4aad8e1
36 changed files with 305 additions and 238 deletions
|
@ -197,10 +197,10 @@ func (opts FindPublicKeyOptions) ToConds() builder.Cond {
|
|||
cond = cond.And(builder.Eq{"fingerprint": opts.Fingerprint})
|
||||
}
|
||||
if len(opts.KeyTypes) > 0 {
|
||||
cond = cond.And(builder.In("type", opts.KeyTypes))
|
||||
cond = cond.And(builder.In("`type`", opts.KeyTypes))
|
||||
}
|
||||
if opts.NotKeytype > 0 {
|
||||
cond = cond.And(builder.Neq{"type": opts.NotKeytype})
|
||||
cond = cond.And(builder.Neq{"`type`": opts.NotKeytype})
|
||||
}
|
||||
if opts.LoginSourceID > 0 {
|
||||
cond = cond.And(builder.Eq{"login_source_id": opts.LoginSourceID})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue