forked from FoundKeyGang/FoundKey
server: set vapid keys on initial setup
This commit is contained in:
parent
563f3672a9
commit
01fa4332c2
1 changed files with 3 additions and 0 deletions
|
@ -35,8 +35,11 @@ async function getMeta(): Promise<void> {
|
|||
},
|
||||
});
|
||||
if (metas.length === 0) {
|
||||
const { publicKey, privateKey } = push.generateVAPIDKeys();
|
||||
await db.manager.insert(Meta, {
|
||||
id: 'x',
|
||||
swPublicKey: publicKey,
|
||||
swPrivateKey: privateKey,
|
||||
});
|
||||
metas = await db.manager.find(Meta, {
|
||||
order: {
|
||||
|
|
Loading…
Reference in a new issue