Skip to content

Commit

Permalink
Added msg and type for send notification method
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Jun 7, 2024
1 parent 173494e commit 15b8fde
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/novu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Novu } from "@novu/node";

export default async function sendNotification(subscriberId: string) {
export default async function sendNotification(
subscriberId: string,
msg: string,
type: string
) {
try {
const novu = new Novu(process.env.NOVU_API_KEY || "");

Expand All @@ -10,8 +14,10 @@ export default async function sendNotification(subscriberId: string) {
to: {
subscriberId,
},
actor: "https://media.tenor.com/iwXHwlY31ecAAAAM/yuji-itadori-suku.gif",
payload: {},
payload: {
msg,
type,
},
});

return subscriberId;
Expand Down

0 comments on commit 15b8fde

Please sign in to comment.