Add shop-chat push notifications and a "send shop to users" endpoint
- shop-chat messages (buyer <-> shop owner) never sent any push notification at all — sendShopChatPushNotification (chatHelpers.js) now fires on every send, mirroring the existing regular-chat push path; data payload carries shop_id/buyer_id/sender_role so clients can route directly to the thread - New POST /shops/:id/send, mirroring the existing shop-product send endpoint — lets a user share a shop itself (not just one product) into a regular chat message as a sharedShop payload Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,8 @@ const {
|
||||
updateShopLocation,
|
||||
updateShopContact,
|
||||
toggleShopFollow,
|
||||
submitShop
|
||||
submitShop,
|
||||
sendShopToUsers
|
||||
} = require('../../../controllers/application/shops/shopController')
|
||||
const {
|
||||
getCart,
|
||||
@@ -48,5 +49,6 @@ router.patch('/:id/location', [blockCheck], updateShopLocation)
|
||||
router.patch('/:id/contact', [blockCheck], updateShopContact)
|
||||
router.post('/:id/follow', [blockCheck], toggleShopFollow)
|
||||
router.post('/:id/submit', [blockCheck], submitShop)
|
||||
router.post('/:id/send', [blockCheck], sendShopToUsers)
|
||||
|
||||
module.exports = router
|
||||
|
||||
Reference in New Issue
Block a user