1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-28 14:58:29 +09:00
This commit is contained in:
syuilo 2018-12-19 06:09:31 +09:00
parent ad869d7469
commit 47bd485a39
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
3 changed files with 4 additions and 18 deletions

View File

@ -108,13 +108,5 @@ autoAdmin: true
# port: 9200 # port: 9200
# pass: null # 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 # Clustering
#clusterLimit: 1 #clusterLimit: 1

View File

@ -43,17 +43,11 @@ export type Source = {
* Service Worker * Service Worker
*/ */
sw?: { sw?: {
public_key: string; publicKey: string;
private_key: string; privateKey: string;
}; };
clusterLimit?: number; clusterLimit?: number;
user_recommendation?: {
external: boolean;
engine: string;
timeout: number;
};
}; };
/** /**

View File

@ -7,8 +7,8 @@ if (config.sw) {
// アプリケーションの連絡先と、サーバーサイドの鍵ペアの情報を登録 // アプリケーションの連絡先と、サーバーサイドの鍵ペアの情報を登録
push.setVapidDetails( push.setVapidDetails(
config.url, config.url,
config.sw.public_key, config.sw.publicKey,
config.sw.private_key); config.sw.privateKey);
} }
export default async function(userId: mongo.ObjectID | string, type: string, body?: any) { export default async function(userId: mongo.ObjectID | string, type: string, body?: any) {