dguglielmi-git / innovandoliving

InnovandoLiving - NextJS Ecommerce - Official Website
2 stars 0 forks source link

Unify fetchRetryParams and fetchRetry #49

Open dguglielmi-git opened 1 year ago

dguglielmi-git commented 1 year ago

Currently, we are using two functions, the idea is to use only one, since it is not required to have two different functions for calling the backend with and without parameters, since we can manage both calls with the same function.

This happened because fetchTryParams was created to test part of the code and finally we never removed it, otherwise, we kept it so it is a good time to refactor the code and use only one function for managing every call across the project.

Dev Notes: Default params should be: headers: { "x-token": token, "Content-Type": "application/json", },