refactor: rewrite useNotifications with RQ

This commit is contained in:
kasia.oczkowska
2024-03-21 09:59:51 +00:00
committed by kattoczko
parent b68aff76a1
commit d808afd21b
9 changed files with 22 additions and 52 deletions

View File

@@ -1,16 +0,0 @@
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;

View File

@@ -7,7 +7,6 @@ import getConnectedApps from './queries/get-connected-apps.js';
import getDynamicData from './queries/get-dynamic-data.js';
import getDynamicFields from './queries/get-dynamic-fields.js';
import getFlow from './queries/get-flow.js';
import getNotifications from './queries/get-notifications.js';
import getStepWithTestExecutions from './queries/get-step-with-test-executions.js';
import testConnection from './queries/test-connection.js';
@@ -21,7 +20,6 @@ const queryResolvers = {
getDynamicData,
getDynamicFields,
getFlow,
getNotifications,
getStepWithTestExecutions,
testConnection,
};

View File

@@ -18,7 +18,6 @@ type Query {
): [SubstepArgument]
getBillingAndUsage: GetBillingAndUsage
getConfig(keys: [String]): JSONObject
getNotifications: [Notification]
}
type Mutation {
@@ -665,13 +664,6 @@ input UpdateAppAuthClientInput {
active: Boolean
}
type Notification {
name: String
createdAt: String
documentationUrl: String
description: String
}
schema {
query: Query
mutation: Mutation