http://localhost:8080/api/notifications/send-payment
{
"sender": "System",
"receiver": "[email protected]",
"message": "Your payment of $100 has been received.",
"subject": "Payment Received"
}
{
"id": "66f06eaaa4537b035443d738",
"sender": "System",
"receiver": "[email protected]",
"status": "SENT",
"message": "Your payment of $100 has been received.",
"subject": "Payment Received",
"type": "PAYMENT",
"createdAt": "2024-09-23T00:53:22.2195226"
}
http://localhost:8080/api/notifications/broadcast
{
"message": "We have an important system update.",
"subject": "System Update Notification"
}
{
"id": "66f0764b271b0348758c8a42",
"sender": "System",
"receiver": "All Users",
"status": "SENT",
"message": "We have an important system update.",
"subject": "System Update Notification",
"type": "BROADCAST",
"createdAt": "2024-09-23T01:25:55.6204563"
}
http://localhost:8080/api/notifications/all
[
{
"id": "66f06eaaa4537b035443d738",
"sender": "System",
"receiver": "[email protected]",
"status": "SENT",
"message": "Your payment of $100 has been received.",
"subject": "Payment Received",
"type": "PAYMENT",
"createdAt": "2024-09-23T00:53:22.219"
},
{
"id": "66f0764b271b0348758c8a42",
"sender": "System",
"receiver": "All Users",
"status": "SENT",
"message": "We have an important system update.",
"subject": "System Update Notification",
"type": "BROADCAST",
"createdAt": "2024-09-23T01:25:55.62"
}
]