email refactor

This commit is contained in:
jackiettran
2025-11-14 17:36:35 -05:00
parent 629f0055a1
commit 3a6da3d47d
25 changed files with 3176 additions and 2219 deletions

View File

@@ -1,6 +1,6 @@
const { Rental, User, Item } = require("../models");
const StripeService = require("./stripeService");
const emailService = require("./emailService");
const emailServices = require("./email");
const { Op } = require("sequelize");
class PayoutService {
@@ -82,7 +82,7 @@ class PayoutService {
// Send payout notification email to owner
try {
await emailService.sendPayoutReceivedEmail(rental);
await emailServices.rentalFlow.sendPayoutReceivedEmail(rental.owner, rental);
console.log(
`Payout notification email sent to owner for rental ${rental.id}`
);