Files
automatisch/packages/backend/src/graphql/queries/get-notifications.js
2024-01-05 19:08:04 +01:00

17 lines
369 B
JavaScript

import axios from '../../helpers/axios-with-proxy.js';
const NOTIFICATIONS_URL =
'https://notifications.automatisch.io/notifications.json';
const getNotifications = async () => {
try {
const { data: notifications = [] } = await axios.get(NOTIFICATIONS_URL);
return notifications;
} catch (err) {
return [];
}
};
export default getNotifications;