From 47bd485a396321880b2d4588a0f80f0bc6f4acca Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 19 Dec 2018 06:09:31 +0900 Subject: [PATCH] Clean up --- .config/example.yml | 8 -------- src/config/types.ts | 10 ++-------- src/push-sw.ts | 4 ++-- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.config/example.yml b/.config/example.yml index 1019f7b44..036f59052 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 3d78685e6..6ca3e3b7f 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 2c09d0547..bfd3b94a5 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) {