Ingemar
Ingemar

Reputation: 1658

How can I make spartacus to use a different field configuration?

I would like to change the endpoint to use fields=FULL instead of the preconfigured fields.

In particular I want to change this endpoint of the storefinder:

https://spartacus-demo.eastus.cloudapp.azure.com:8443/occ/v2/electronics-spa/stores

Upvotes: 0

Views: 191

Answers (1)

Ingemar
Ingemar

Reputation: 1658

Miroslaws comment pointed me to the official documentation and helped me to change my stores endpoint. You can do this for all endpoints.

@NgModule({
  imports: [
    B2sStorefrontModule.withConfig({
      backend: {
        occ: {
          endpoints: {
            stores: 'stores?fields=stores(FULL),pagination(DEFAULT),sorts(DEFAULT)'
          }
        }
      }
    })
  ]
})

Upvotes: 1

Related Questions