maybe fix duplicate notification response issue
This commit is contained in:
		| @ -188,6 +188,7 @@ const deleteNotification = async (notification: Notification) => { | |||||||
|     ); |     ); | ||||||
|     if (!response.ok) { |     if (!response.ok) { | ||||||
|       console.error(`Could not delete notification ID: ${notification.id}`); |       console.error(`Could not delete notification ID: ${notification.id}`); | ||||||
|  |       console.error(response.statusText); | ||||||
|     } |     } | ||||||
|   } catch (error: any) { |   } catch (error: any) { | ||||||
|     throw new Error(error.message); |     throw new Error(error.message); | ||||||
| @ -198,8 +199,8 @@ const fetchInterval = process.env.FETCH_INTERVAL | |||||||
|   ? parseInt(process.env.FETCH_INTERVAL) |   ? parseInt(process.env.FETCH_INTERVAL) | ||||||
|   : 15000; |   : 15000; | ||||||
|  |  | ||||||
| const beginFetchCycle = async () => { |  | ||||||
| let notifications = []; | let notifications = []; | ||||||
|  | const beginFetchCycle = async () => { | ||||||
|   setInterval(async () => { |   setInterval(async () => { | ||||||
|     notifications = await getNotifications(); |     notifications = await getNotifications(); | ||||||
|     if (notifications.length > 0) { |     if (notifications.length > 0) { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user