From 63684afbffe1ada76556f80359676fc37836bcd8 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Wed, 13 Mar 2024 00:31:46 +0530 Subject: [PATCH] chore: bruno notifications endpoint --- packages/bruno-electron/src/ipc/notifications.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/bruno-electron/src/ipc/notifications.js b/packages/bruno-electron/src/ipc/notifications.js index 10fdae5bf..c49e87fed 100644 --- a/packages/bruno-electron/src/ipc/notifications.js +++ b/packages/bruno-electron/src/ipc/notifications.js @@ -15,15 +15,11 @@ const registerNotificationsIpc = (mainWindow, watcher) => { module.exports = registerNotificationsIpc; -const fetchNotifications = async (props) => { +const fetchNotifications = async () => { try { - const { lastNotificationId } = props || {}; - let url = process.env.BRUNO_INFO_ENDPOINT; - if (!url) { - return Promise.reject('Invalid notifications endpoint', error); - } - if (lastNotificationId) url += `?lastNotificationId=${lastNotificationId}`; + let url = process.env.BRUNO_INFO_ENDPOINT || 'https://appinfo.usebruno.com'; const data = await fetch(url).then((res) => res.json()); + return data?.notifications || []; } catch (error) { return Promise.reject('Error while fetching notifications!', error);