Skip to content

Commit

Permalink
fix: notification not always weather alert
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudambro committed Jan 30, 2024
1 parent 7f0d4a9 commit 41e4ca4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api-node/src/controllers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ router.put(
if (usersWithSamePushToken.length > 0) {
await prisma.user.updateMany({
where: {
id: { in: usersWithSamePushToken.map((u) => u.id) },
id: { in: usersWithSamePushToken.map((user) => user.id) },
},
data: {
push_notif_token: `DELETED_${pushToken}`,
Expand Down
4 changes: 2 additions & 2 deletions api-node/src/utils/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async function sendMorningNotification() {
type_weather_alert: typeWeatherAlertId,
}
: {
indicator: IndicatorsSlugEnum.weather_alert,
indicator: indicatorSlug,
indicator_value: indicatorValue,
},
select: {
Expand Down Expand Up @@ -421,7 +421,7 @@ async function sendEveningNotification() {
type_weather_alert: typeWeatherAlertId,
}
: {
indicator: IndicatorsSlugEnum.weather_alert,
indicator: indicatorSlug,
indicator_value: indicatorValue,
},
select: {
Expand Down

0 comments on commit 41e4ca4

Please sign in to comment.