database/postgres: fix inverted network and user in StoreWebPushSubscription

This commit is contained in:
Simon Ser 2022-07-25 18:49:21 +02:00
parent f37aedea79
commit 6734464b72

View File

@ -768,7 +768,7 @@ func (db *PostgresDB) StoreWebPushSubscription(ctx context.Context, userID, netw
network, endpoint, key_auth, key_p256dh, key_vapid) network, endpoint, key_auth, key_p256dh, key_vapid)
VALUES (NOW(), NOW(), $1, $2, $3, $4, $5, $6) VALUES (NOW(), NOW(), $1, $2, $3, $4, $5, $6)
RETURNING id`, RETURNING id`,
nullNetworkID, userID, sub.Endpoint, sub.Keys.Auth, sub.Keys.P256DH, userID, nullNetworkID, sub.Endpoint, sub.Keys.Auth, sub.Keys.P256DH,
sub.Keys.VAPID).Scan(&sub.ID) sub.Keys.VAPID).Scan(&sub.ID)
} }