From eec453109413f2dff9a9cbcf58c785f464497675 Mon Sep 17 00:00:00 2001 From: Arnaud Ambroselli <31724752+arnaudambro@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:57:44 +0200 Subject: [PATCH] fix: OZENSEMBLE-K2 (#613) --- api/src/utils/notifications.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/utils/notifications.js b/api/src/utils/notifications.js index 5a12773de..b2910fcbe 100644 --- a/api/src/utils/notifications.js +++ b/api/src/utils/notifications.js @@ -86,7 +86,7 @@ const scheduleNotificationsInactivity5DaysCronJob = async () => { }); for (const { id } of users) { - saveInactivity5Days(id); + await saveInactivity5Days(id); } } catch (e) { capture(e, { level: "error" }); @@ -138,7 +138,7 @@ const scheduleNotificationsNotFilledWeekCronJob = async () => { }); for (const { id } of users) { - saveNotFilledWeek(id); + await saveNotFilledWeek(id); } } catch (e) { capture(e, { level: "error" }); @@ -435,7 +435,7 @@ const notificationsCronJob = async () => { const sentNotifications = []; for (const notif of notifs) { if (!notif?.user?.push_notif_token) continue; - sendPushNotification({ + await sendPushNotification({ userId: notif.user.id, matomoId: notif.user.matomo_id, pushNotifToken: notif.user.push_notif_token,