Explorar o código

fix(server): Correctly define default customFields

Michael Bromley %!s(int64=7) %!d(string=hai) anos
pai
achega
8e4e17a356
Modificáronse 3 ficheiros con 4 adicións e 1 borrados
  1. 0 0
      schema.json
  2. 1 0
      server/dev-config.ts
  3. 3 1
      server/src/config/vendure-config.ts

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
schema.json


+ 1 - 0
server/dev-config.ts

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

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

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

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio