mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-01 11:09:13 +01:00
Fix GetVAPIDKeyPair
This commit is contained in:
parent
317e6ee7d5
commit
a76556c866
@ -42,11 +42,15 @@ func (w *webPushDB) GetVAPIDKeyPair(ctx context.Context) (*gtsmodel.VAPIDKeyPair
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Look for previously generated keys in the database.
|
// Look for previously generated keys in the database.
|
||||||
|
vapidKeyPair = >smodel.VAPIDKeyPair{}
|
||||||
if err := w.db.NewSelect().
|
if err := w.db.NewSelect().
|
||||||
Model(vapidKeyPair).
|
Model(vapidKeyPair).
|
||||||
Limit(1).
|
Limit(1).
|
||||||
Scan(ctx); // nocollapse
|
Scan(ctx); // nocollapse
|
||||||
err != nil && !errors.Is(err, db.ErrNoEntries) {
|
err != nil {
|
||||||
|
if errors.Is(err, db.ErrNoEntries) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user