mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 02:43:24 +00:00
refactor: Remove unused createCustomersCollection export and related usage
- Eliminate `createCustomersCollection` from collections and main index files - Update `config.collections` logic to remove customer collection dependency
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
export { createCustomersCollection } from './customers'
|
|
||||||
export { createInvoicesCollection } from './invoices'
|
export { createInvoicesCollection } from './invoices'
|
||||||
export { createPaymentsCollection } from './payments'
|
export { createPaymentsCollection } from './payments'
|
||||||
export { createRefundsCollection } from './refunds'
|
export { createRefundsCollection } from './refunds'
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import type { Config } from 'payload'
|
|||||||
|
|
||||||
import type { BillingPluginConfig, CustomerInfoExtractor } from './types'
|
import type { BillingPluginConfig, CustomerInfoExtractor } from './types'
|
||||||
|
|
||||||
import { createCustomersCollection } from './collections/customers'
|
|
||||||
import { createInvoicesCollection } from './collections/invoices'
|
import { createInvoicesCollection } from './collections/invoices'
|
||||||
import { createPaymentsCollection } from './collections/payments'
|
import { createPaymentsCollection } from './collections/payments'
|
||||||
import { createRefundsCollection } from './collections/refunds'
|
import { createRefundsCollection } from './collections/refunds'
|
||||||
@@ -42,7 +41,6 @@ export const billingPlugin = (pluginConfig: BillingPluginConfig = {}) => (config
|
|||||||
|
|
||||||
config.collections.push(
|
config.collections.push(
|
||||||
createPaymentsCollection(pluginConfig.collections?.payments || 'payments'),
|
createPaymentsCollection(pluginConfig.collections?.payments || 'payments'),
|
||||||
createCustomersCollection(customerSlug),
|
|
||||||
createInvoicesCollection(
|
createInvoicesCollection(
|
||||||
pluginConfig.collections?.invoices || 'invoices',
|
pluginConfig.collections?.invoices || 'invoices',
|
||||||
pluginConfig.collections?.customerRelation !== false ? customerSlug : undefined,
|
pluginConfig.collections?.customerRelation !== false ? customerSlug : undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user