diff --git a/.config/example.yml b/.config/example.yml index 1019f7b44b..036f59052f 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -108,13 +108,5 @@ autoAdmin: true # port: 9200 # pass: null -# ServiceWorker -#sw: -# # Public key of VAPID -# public_key: example-sw-public-key -# -# # Private key of VAPID -# private_key: example-sw-private-key - # Clustering #clusterLimit: 1 diff --git a/src/config/types.ts b/src/config/types.ts index 3d78685e6a..6ca3e3b7f2 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -43,17 +43,11 @@ export type Source = { * Service Worker */ sw?: { - public_key: string; - private_key: string; + publicKey: string; + privateKey: string; }; clusterLimit?: number; - - user_recommendation?: { - external: boolean; - engine: string; - timeout: number; - }; }; /** diff --git a/src/push-sw.ts b/src/push-sw.ts index 2c09d0547e..bfd3b94a57 100644 --- a/src/push-sw.ts +++ b/src/push-sw.ts @@ -7,8 +7,8 @@ if (config.sw) { // アプリケーションの連絡先と、サーバーサイドの鍵ペアの情報を登録 push.setVapidDetails( config.url, - config.sw.public_key, - config.sw.private_key); + config.sw.publicKey, + config.sw.privateKey); } export default async function(userId: mongo.ObjectID | string, type: string, body?: any) {