feat: improve notifications - fix auth code tg duplicate, double order notify, add PAID label, expand text, add deliveryFeeAdjusted event

This commit is contained in:
Kirill
2026-05-18 14:48:54 +05:00
parent 2f67c37502
commit d0b3c97803
17 changed files with 729 additions and 8 deletions
+1
View File
@@ -25,6 +25,7 @@ export async function registerUserNotificationRoutes(fastify) {
if ('orderStatusChanged' in body) data.orderStatusChanged = Boolean(body.orderStatusChanged)
if ('orderMessageReceived' in body) data.orderMessageReceived = Boolean(body.orderMessageReceived)
if ('paymentStatusChanged' in body) data.paymentStatusChanged = Boolean(body.paymentStatusChanged)
if ('deliveryFeeAdjusted' in body) data.deliveryFeeAdjusted = Boolean(body.deliveryFeeAdjusted)
const prefs = await prisma.notificationPreference.upsert({
where: { userId },