This commit is contained in:
syuilo 2018-06-18 14:28:43 +09:00
parent 80e5645a84
commit e66d7babc5
56 changed files with 115 additions and 112 deletions

View file

@ -11,7 +11,7 @@ if (config.sw) {
config.sw.private_key);
}
export default async function(userId: mongo.ObjectID | string, type, body?) {
export default async function(userId: mongo.ObjectID | string, type: string, body?: any) {
if (!config.sw) return;
if (typeof userId === 'string') {
@ -34,7 +34,7 @@ export default async function(userId: mongo.ObjectID | string, type, body?) {
push.sendNotification(pushSubscription, JSON.stringify({
type, body
})).catch(err => {
})).catch((err: any) => {
//console.log(err.statusCode);
//console.log(err.headers);
//console.log(err.body);