diff --git a/packages/api/src/router/monitor.ts b/packages/api/src/router/monitor.ts index 764c8cd4..20a245c8 100644 --- a/packages/api/src/router/monitor.ts +++ b/packages/api/src/router/monitor.ts @@ -75,7 +75,7 @@ export const monitorRouter = createTRPCRouter({ .returning() .get(); - if (Boolean(notifications.length)) { + if (notifications.length > 0) { // We should make sure the user has access to the notifications const allNotifications = await opts.ctx.db.query.notification.findMany({ where: inArray(notification.id, notifications), @@ -165,7 +165,7 @@ export const monitorRouter = createTRPCRouter({ ?.includes(x), ); - if (Boolean(addedNotifications.length)) { + if (addedNotifications.length > 0) { const values = addedNotifications.map((notificationId) => ({ monitorId: currentMonitor.id, notificationId, @@ -178,7 +178,7 @@ export const monitorRouter = createTRPCRouter({ .map(({ notificationId }) => notificationId) .filter((x) => !notifications?.includes(x)); - if (Boolean(removedNotifications.length)) { + if (removedNotifications.length > 0) { await opts.ctx.db .delete(notificationsToMonitors) .where( diff --git a/packages/api/src/router/statusReport.ts b/packages/api/src/router/statusReport.ts index 9b43f013..ae482ca8 100644 --- a/packages/api/src/router/statusReport.ts +++ b/packages/api/src/router/statusReport.ts @@ -131,7 +131,7 @@ export const statusReportRouter = createTRPCRouter({ await sendEmailHtml({ to: subscribersEmails, subject: `New status update for ${pageInfo.title}`, - html: `

Hi,

${pageInfo.title} just posted an update on their status page:

New Status : ${statusReportUpdate.status}

${statusReportUpdate.message}

Powered by OpenStatus

+ html: `

Hi,

${pageInfo.title} just posted an update on their status page:

New Status : ${updatedValue.status}

${updatedValue.message}

Powered by OpenStatus

`, from: "Notification OpenStatus ", });