This commit is contained in:
syuilo 2018-12-20 04:08:13 +09:00
parent 710ba526fa
commit 454632d785
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
9 changed files with 91 additions and 25 deletions

View file

@ -285,6 +285,27 @@ export const meta = {
'ja-JP': 'SMTPサーバのパスワード'
}
},
enableServiceWorker: {
validator: $.bool.optional,
desc: {
'ja-JP': 'ServiceWorkerを有効にするか否か'
}
},
swPublicKey: {
validator: $.str.optional.nullable,
desc: {
'ja-JP': 'ServiceWorkerのVAPIDキーペアの公開鍵'
}
},
swPrivateKey: {
validator: $.str.optional.nullable,
desc: {
'ja-JP': 'ServiceWorkerのVAPIDキーペアの秘密鍵'
}
},
}
};
@ -447,6 +468,18 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
set.errorImageUrl = ps.errorImageUrl;
}
if (ps.enableServiceWorker !== undefined) {
set.enableServiceWorker = ps.enableServiceWorker;
}
if (ps.swPublicKey !== undefined) {
set.swPublicKey = ps.swPublicKey;
}
if (ps.swPrivateKey !== undefined) {
set.swPrivateKey = ps.swPrivateKey;
}
await Meta.update({}, {
$set: set
}, { upsert: true });