Merge pull request #1718 from automatisch/AUT-830

refactor: rewrite useInvoices with RQ
This commit is contained in:
Ali BARIN
2024-03-15 13:22:21 +01:00
committed by GitHub
6 changed files with 24 additions and 52 deletions

View File

@@ -1,19 +0,0 @@
import Billing from '../../helpers/billing/index.ee.js';
const getInvoices = async (_parent, _params, context) => {
const subscription = await context.currentUser.$relatedQuery(
'currentSubscription'
);
if (!subscription) {
return;
}
const invoices = await Billing.paddleClient.getInvoices(
Number(subscription.paddleSubscriptionId)
);
return invoices;
};
export default getInvoices;

View File

@@ -9,7 +9,6 @@ import getDynamicData from './queries/get-dynamic-data.js';
import getDynamicFields from './queries/get-dynamic-fields.js';
import getFlow from './queries/get-flow.js';
import getFlows from './queries/get-flows.js';
import getInvoices from './queries/get-invoices.ee.js';
import getNotifications from './queries/get-notifications.js';
import getPermissionCatalog from './queries/get-permission-catalog.ee.js';
import getSamlAuthProviderRoleMappings from './queries/get-saml-auth-provider-role-mappings.ee.js';
@@ -34,7 +33,6 @@ const queryResolvers = {
getDynamicFields,
getFlow,
getFlows,
getInvoices,
getNotifications,
getPermissionCatalog,
getSamlAuthProvider,

View File

@@ -26,7 +26,6 @@ type Query {
getBillingAndUsage: GetBillingAndUsage
getCurrentUser: User
getConfig(keys: [String]): JSONObject
getInvoices: [Invoice]
getPermissionCatalog: PermissionCatalog
getNotifications: [Notification]
getSamlAuthProvider: SamlAuthProvider
@@ -651,14 +650,6 @@ type Usage {
task: Int
}
type Invoice {
id: Int
amount: Float
currency: String
payout_date: String
receipt_url: String
}
type ListSamlAuthProvider {
id: String
name: String