Merge pull request #1718 from automatisch/AUT-830
refactor: rewrite useInvoices with RQ
This commit is contained in:
@@ -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;
|
@@ -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,
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user