We need to update the Product management by changing the logic used by Strapi to start using the Cloud function backend. To do so, we need to update the method listed below.
In Scope:
getLastProducts: this call is requesting the products with a limit, and a sort (limit=50&_sort=createAt:desc&publish=true)
createAt remains since we will continue using this field
publish is only used by Strapi, we can do without this field
the calling is performed like this: /productos?${limitItems}&${sortItems} (ignore the Spanish in the name of the endpoint, we will change it to English)
getProductPlatform: this call is for getting all the products related to a platform (category) we can update the current logic keeping the sorting by createAt field as DESC and using the limit and start for pagination.
getTotalProductsPlatform: This call is just for getting the count result for a specific platform
getProductByURL: this call will get a product by its path, previously we were using the url as the path, but after the changes made in the structure, now we need to use the Product ID.
searchProducts: This call is for getting a product by its title (Pending adding more details about it)
We need to update the Product management by changing the logic used by Strapi to start using the Cloud function backend. To do so, we need to update the method listed below.
In Scope: