diff --git a/backend/src/jobs.ts b/backend/src/jobs.ts index 4dca95e..ee4d97a 100644 --- a/backend/src/jobs.ts +++ b/backend/src/jobs.ts @@ -109,7 +109,7 @@ async function runAutoCancelNoShows(): Promise { title: 'Гость не заехал — бронь отменена', body: `${b.guest_name ?? 'Гость'} не заехал вовремя. Бронирование автоматически отмечено как неявка.`, bookingId: b.id, - link: `/${hotel.slug}/bookings`, + link: '/bookings', }).catch(() => {}) } } @@ -192,7 +192,7 @@ async function runAutoCheckouts(): Promise { title: 'Автоматическое выселение', body: `${b.guest_name ?? 'Гость'} выселен автоматически по истечении времени проживания.`, bookingId: b.id, - link: `/${hotel.slug}/calendar`, + link: '/calendar', }).catch(() => {}) } } @@ -348,7 +348,7 @@ async function runUnreadMessagesJob(): Promise { type: 'unread_messages', title: `Непрочитанные сообщения — ${row.room_name}`, body, - link: `/${row.hotel_slug}/chat`, + link: '/chat', }).catch(() => {}) void sendPushForNotification(row.hotel_id, 'unread_messages', { diff --git a/backend/src/routes/publicWidget.ts b/backend/src/routes/publicWidget.ts index 9f1970d..8695406 100644 --- a/backend/src/routes/publicWidget.ts +++ b/backend/src/routes/publicWidget.ts @@ -475,7 +475,7 @@ const publicWidget: FastifyPluginAsync = async (fastify) => { title: `Новая бронь через сайт — ${guestName}`, body: `${checkIn} — ${checkOut}, ${nights} ${nights === 1 ? 'ночь' : nights < 5 ? 'ночи' : 'ночей'}`, bookingId, - link: `/${hotel.slug}/bookings`, + link: '/bookings', }) void sendPushForNotification(hotel.id, 'new_booking', { title: `Новая бронь через сайт — ${guestName}`, diff --git a/backend/src/routes/reviews.ts b/backend/src/routes/reviews.ts index bfad5a7..d76038f 100644 --- a/backend/src/routes/reviews.ts +++ b/backend/src/routes/reviews.ts @@ -261,7 +261,7 @@ const reviewsRoutes: FastifyPluginAsync = async (fastify) => { type: 'new_review', title: `Новый отзыв — ${rating}★`, body: `${booking.guest_name ?? 'Гость'}${text ? ': ' + text.slice(0, 80) : ''}`, - link: `/${hotelSlug}/reviews`, + link: '/reviews', }) void sendPushForNotification(booking.hotel_id, 'new_review', { title: `Новый отзыв — ${rating}★`, @@ -361,7 +361,7 @@ const reviewsRoutes: FastifyPluginAsync = async (fastify) => { type: 'new_review', title: `Новый QR-отзыв — №${room}, ${rating}★`, body: text ? text.slice(0, 80) : `Оценка: ${rating} из 5`, - link: `/${slug}/reviews`, + link: '/reviews', }) void sendPushForNotification(hotel.id, 'new_review', { title: `Новый QR-отзыв — №${room}, ${rating}★`,