Delete & View Notification Providers

This commit is contained in:
headlesdev
2025-05-25 00:56:54 +02:00
parent 6ba144b7bd
commit 1e93f84b24
5 changed files with 118 additions and 6 deletions

View File

@@ -31,8 +31,8 @@ const useNotifications = () => {
});
};
const deleteNotification = (notificationId: number) => {
axios.delete('/api/notifications/delete', { params: { notificationId } })
const deleteNotification = (notificationId: number): Promise<string> | string => {
return axios.delete('/api/notifications/delete', { params: { notificationId } })
.then(() => {
return "Notification deleted successfully";
})