summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/sw
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-18 09:54:53 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-18 09:54:53 +0900
commit80e5645a84cc60d76f79c48a3d565fb66ad88643 (patch)
tree1e2fc1c6c9ffb7989c5db997eae906c013433eda /src/server/api/endpoints/sw
parentMerge pull request #1738 from rinsuki/features/ts-noimplicitany-true (diff)
downloadsharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.tar.gz
sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.tar.bz2
sharkey-80e5645a84cc60d76f79c48a3d565fb66ad88643.zip
wip
Diffstat (limited to 'src/server/api/endpoints/sw')
-rw-r--r--src/server/api/endpoints/sw/register.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/api/endpoints/sw/register.ts b/src/server/api/endpoints/sw/register.ts
index b22a8b08ef..f04a77fa4d 100644
--- a/src/server/api/endpoints/sw/register.ts
+++ b/src/server/api/endpoints/sw/register.ts
@@ -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');