Files
automatisch/packages/backend/src/graphql/queries/get-notifications.ts
2023-08-28 20:44:55 +00:00

16 lines
364 B
TypeScript

import axios from '../../helpers/axios-with-proxy';
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;