From 65e222d2fb791e417be5dcc5fab5f0fcd08cd56c Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 19 Dec 2022 17:08:34 +0800 Subject: [PATCH] Remove debug --- packages/api/src/routers/notification_router.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/api/src/routers/notification_router.ts b/packages/api/src/routers/notification_router.ts index 643efe1ce..14e44303d 100644 --- a/packages/api/src/routers/notification_router.ts +++ b/packages/api/src/routers/notification_router.ts @@ -39,17 +39,11 @@ export function notificationRouter() { } = req.body as Notification if (!userId || !body) { - console.log( - ' -- send notification failed no user id or body', - userId, - body - ) return res.status(400).send({ errorCode: 'BAD_DATA' }) } const tokens = await getDeviceTokensByUserId(userId) if (tokens.length === 0) { - console.log(' -- send notification failed no device tokens') return res.status(400).send({ errorCode: 'NO_DEVICE_TOKENS' }) } @@ -57,7 +51,7 @@ export function notificationRouter() { notification: { title, body, - // imageUrl, + imageUrl, }, data, tokens: tokens.map((token) => token.token), @@ -69,7 +63,6 @@ export function notificationRouter() { notificationType || 'rule' ) if (!result) { - console.log(' -- send notification failed for message: ', message) return res.status(400).send({ errorCode: 'SEND_NOTIFICATION_FAILED' }) }