Skip to content

Commit

Permalink
Email wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Nov 13, 2023
1 parent 58d7ed8 commit 3c0724d
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions apps/dashboard/src/jobs/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,41 +141,41 @@ client.defineJob({

if (transactionsData?.length && transactionsData.length > 0) {
// Send notification for each transaction
triggerBulk(
transactionsData.map((transaction) => ({
name: TriggerEvents.TransactionNewInApp,
payload: {
html: "TODO",
},
users: [
{
subscriberId: "",
teamId: "123",
email: "",
fullName: "Pontus Abrahamsson",
avatarUrl: "https://",
},
],
}))
);
// triggerBulk(
// transactionsData.map((transaction) => ({
// name: TriggerEvents.TransactionNewInApp,
// payload: {
// html: "TODO",
// },
// users: [
// {
// subscriberId: "",
// teamId: "123",
// email: "",
// fullName: "Pontus Abrahamsson",
// avatarUrl: "https://",
// },
// ],
// }))
// );

// Send email with react-email-template
trigger({
name: TriggerEvents.TransactionNewEmail,
payload: {
subject: "New transactions",
html: "TODO",
},
users: [
{
subscriberId: "",
teamId: "123",
email: "",
fullName: "Pontus Abrahamsson",
avatarUrl: "https://",
},
],
});
// trigger({
// name: TriggerEvents.TransactionNewEmail,
// payload: {
// subject: "New transactions",
// html: "TODO",
// },
// users: [
// {
// subscriberId: "",
// teamId: "123",
// email: "",
// fullName: "Pontus Abrahamsson",
// avatarUrl: "https://",
// },
// ],
// });

revalidateTag(`transactions_${data?.team_id}`);
revalidateTag(`spending_${data?.team_id}`);
Expand Down

0 comments on commit 3c0724d

Please sign in to comment.