UNPKG

@ideal-photography/shared

Version:

Shared MongoDB and utility logic for Ideal Photography PWAs: users, products, services, bookings, orders/cart, galleries, reviews, notifications, campaigns, settings, audit logs, minimart items/orders, and push notification subscriptions.

18 lines (16 loc) 580 B
import { format } from 'date-fns'; /** * Handler for 'user.registered' trigger * @param {{ user: Object }} payload */ export function registered({ user }) { return { title: 'Welcome to IDEAS MEDIA COMPANY', message: `Hi ${user.name || 'there'}! Your account was created on ${format(new Date(), 'PPP')}.`, type: 'verification', recipients: { users: [user._id] }, channels: { inApp: true, email: true, push: true }, emailTemplate: 'welcome', emailData: { name: user.name, email: user.email } }; }