eShopOnContainers icon indicating copy to clipboard operation
eShopOnContainers copied to clipboard

3 separate calls to catalog API

Open andrewhaine1 opened this issue 4 years ago • 4 comments

in the 'src/Web/WebSPA/Client/src/modules/catalog/catalog.component.ts', 3 separate calls are made to the catalog API to get brands, catalog, and types in the loadData() function (shown below). Why was this not done using aggregation? Perhaps one HTTP get request to an action method on the aggregation service which would combine the catalog, as well as brands and types into one response?

loadData() { this.getBrands(); this.getCatalog(12, 0); this.getTypes(); }

andrewhaine1 avatar Oct 24 '21 13:10 andrewhaine1

Hello Andrew, can I take care of this (could you make me the assignee)? :)

tiagobatista avatar Nov 02 '21 15:11 tiagobatista

Hello Andrew, can I take care of this (could you make me the assignee)? :)

Hi Tiago. Sure

andrewhaine1 avatar Nov 15 '21 10:11 andrewhaine1

Hello Andrew, can I take care of this (could you make me the assignee)? :)

It probably shouldn't have been logged as an issue but maybe just a general question.

andrewhaine1 avatar Nov 15 '21 10:11 andrewhaine1

Good scenario. It will be awesome if you can send us a PR :) cc @sughosneo

nishanil avatar Nov 15 '21 19:11 nishanil