From 6d1e7e4d5c7fc58b9caf573def26831423329a1e Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 6 Oct 2023 02:33:40 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=9C=A0=EC=A0=80=EC=97=90=EA=B2=8C=20?= =?UTF-8?q?=ED=91=B8=EC=8B=9C=EC=95=8C=EB=A6=BC=20=EC=95=88=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/subscribe/service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apis/subscribe/service.ts b/src/apis/subscribe/service.ts index 8f8bd1a5..7624d726 100644 --- a/src/apis/subscribe/service.ts +++ b/src/apis/subscribe/service.ts @@ -76,6 +76,10 @@ export const pushNotification = ( db.query(query, async (err: Error, res: SubscribeUser[]) => { if (err) console.error(err); + if (res.length === 0) { + resolve(0); + return; + } for (const userInfo of res) { for (const lists of noticeTitle) { try { @@ -99,8 +103,6 @@ export const pushNotification = ( } } resolve(res.length); - - resolve(0); } }); });