mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-19 02:00:01 +02: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
|
@ -663,7 +663,10 @@ func ShowSSHKeys(ctx *context.Context) {
|
|||
|
||||
// ShowGPGKeys output all the public GPG keys of user by uid
|
||||
func ShowGPGKeys(ctx *context.Context) {
|
||||
keys, err := asymkey_model.ListGPGKeys(ctx, ctx.ContextUser.ID, db.ListOptions{})
|
||||
keys, err := db.Find[asymkey_model.GPGKey](ctx, asymkey_model.FindGPGKeyOptions{
|
||||
ListOptions: db.ListOptionsAll,
|
||||
OwnerID: ctx.ContextUser.ID,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("ListGPGKeys", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue