Sfoglia il codice sorgente

fix(server): Correctly define default customFields

Michael Bromley 7 anni fa
parent
commit
8e4e17a356
3 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 0 0
      schema.json
  2. 1 0
      server/dev-config.ts
  3. 3 1
      server/src/config/vendure-config.ts

File diff suppressed because it is too large
+ 0 - 0
schema.json


+ 1 - 0
server/dev-config.ts

@@ -22,6 +22,7 @@ export const devConfig: VendureConfig = {
     },
     customFields: {
         Facet: [{ name: 'searchable', type: 'boolean' }],
+        FacetValue: [{ name: 'link', type: 'string' }, { name: 'available', type: 'boolean' }],
         Product: [
             { name: 'infoUrl', type: 'string' },
             { name: 'downloadable', type: 'boolean' },

+ 3 - 1
server/src/config/vendure-config.ts

@@ -64,12 +64,14 @@ const defaultConfig: ReadOnlyRequired<VendureConfig> = {
     customFields: {
         Address: [],
         Customer: [],
+        Facet: [],
+        FacetValue: [],
         Product: [],
         ProductOption: [],
         ProductOptionGroup: [],
         ProductVariant: [],
         User: [],
-    },
+    } as ReadOnlyRequired<CustomFields>,
 };
 
 let activeConfig = defaultConfig;

Some files were not shown because too many files changed in this diff