Skip to content

Commit

Permalink
Merge pull request #126 from GDSC-PKNU-21-22/fix/#125
Browse files Browse the repository at this point in the history
Fix: 유저에게 푸시알림 안가는 문제 해결
  • Loading branch information
pp449 authored Oct 5, 2023
2 parents c928976 + 6d1e7e4 commit 2183a54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/apis/subscribe/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -99,8 +103,6 @@ export const pushNotification = (
}
}
resolve(res.length);

resolve(0);
}
});
});
Expand Down

0 comments on commit 2183a54

Please sign in to comment.