mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-05 01:52:46 +00:00
Fix GetVAPIDKeyPair
This commit is contained in:
parent
c8d213a9ef
commit
74b0541e02
|
@ -42,11 +42,15 @@ func (w *webPushDB) GetVAPIDKeyPair(ctx context.Context) (*gtsmodel.VAPIDKeyPair
|
|||
}
|
||||
|
||||
// Look for previously generated keys in the database.
|
||||
vapidKeyPair = >smodel.VAPIDKeyPair{}
|
||||
if err := w.db.NewSelect().
|
||||
Model(vapidKeyPair).
|
||||
Limit(1).
|
||||
Scan(ctx); // nocollapse
|
||||
err != nil && !errors.Is(err, db.ErrNoEntries) {
|
||||
err != nil {
|
||||
if errors.Is(err, db.ErrNoEntries) {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue