This commit is contained in:
syuilo
2018-06-18 09:54:53 +09:00
parent a766faeae9
commit 80e5645a84
150 changed files with 305 additions and 2334 deletions

View File

@ -1,13 +1,11 @@
/**
* Module dependencies
*/
import $ from 'cafy';
import Subscription from '../../../../models/sw-subscription';
import { ILocalUser } from '../../../../models/user';
/**
* subscribe service worker
*/
module.exports = async (params, user, app) => new Promise(async (res, rej) => {
module.exports = async (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
// Get 'endpoint' parameter
const [endpoint, endpointErr] = $.str.get(params.endpoint);
if (endpointErr) return rej('invalid endpoint param');