diff --git a/firestore-one-to-one/extension.yaml b/firestore-one-to-one/extension.yaml index dae05b4..814969c 100644 --- a/firestore-one-to-one/extension.yaml +++ b/firestore-one-to-one/extension.yaml @@ -117,22 +117,6 @@ params: example: capitals required: true - - param: COLLECTION_A_REF_FIELD - label: Collection A reference field - description: >- - The name of the field in Collection A that will contain a reference to Collection B. - type: string - example: capitalId - required: true - - - param: COLLECTION_B_REF_FIELD - label: Collection B reference field - description: >- - The name of the field in Collection B that will contain a reference to Collection A. - type: string - example: countryId - required: true - - param: COLLECTION_A_DATA_FIELD label: Collection A data field description: >- diff --git a/firestore-one-to-one/functions/src/config.ts b/firestore-one-to-one/functions/src/config.ts index 5eba56b..0a46fd6 100644 --- a/firestore-one-to-one/functions/src/config.ts +++ b/firestore-one-to-one/functions/src/config.ts @@ -8,8 +8,6 @@ export enum DeletionBehavior { interface Config { collectionAPath: string; collectionBPath: string; - collectionARefField: string; - collectionBRefField: string; collectionADataField: string; collectionBDataField: string; fieldsToCopyFromAToB?: string[]; @@ -21,8 +19,6 @@ interface Config { const config: Config = { collectionAPath: process.env.COLLECTION_A_PATH!, collectionBPath: process.env.COLLECTION_B_PATH!, - collectionARefField: process.env.COLLECTION_A_REF_FIELD!, - collectionBRefField: process.env.COLLECTION_B_REF_FIELD!, collectionADataField: process.env.COLLECTION_A_DATA_FIELD!, collectionBDataField: process.env.COLLECTION_B_DATA_FIELD!, fieldsToCopyFromAToB: process.env.FIELDS_TO_COPY_FROM_A_TO_B?.split(","), @@ -35,7 +31,6 @@ const config: Config = { export interface CollectionConfig { collectionPath: string; - refField: string; dataField: string; fieldsToCopy?: string[]; deletionBehavior: DeletionBehavior; @@ -43,7 +38,6 @@ export interface CollectionConfig { export const collectionAConfig: CollectionConfig = { collectionPath: config.collectionAPath, - refField: config.collectionARefField, dataField: config.collectionADataField, fieldsToCopy: config.fieldsToCopyFromAToB, deletionBehavior: config.collectionADeletionBehavior, @@ -51,7 +45,6 @@ export const collectionAConfig: CollectionConfig = { export const collectionBConfig: CollectionConfig = { collectionPath: config.collectionBPath, - refField: config.collectionBRefField, dataField: config.collectionBDataField, fieldsToCopy: config.fieldsToCopyFromBToA, deletionBehavior: config.collectionBDeletionBehavior,