refactor: rewrite useInvoices with RQ

This commit is contained in:
Rıdvan Akca
2024-03-13 13:59:56 +03:00
parent c849afbc11
commit 87c25cbbfe
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;