import { Injectable } from '@angular/core' ; import { DaffProductDriverResponse } from '@daffodil/product/driver' ; import { MagentoProduct } from '../models/magento-product' ; import { DaffMagentoProductsTransformer } from './product-transformers' ; param product @ Injectable ( { providedIn : 'root' , } ) export class DaffMagentoProductResponseTransformers { constructor ( private magentoProductsTransformers ) { } transformMagentoProductResponse ( product , mediaUrl ) { const daffProduct = this . magentoProductsTransformers . transformMagentoProduct ( product , mediaUrl ) ; return { id : daffProduct . id , products : [ daffProduct ] , } ; } }