add missing endpoints brand, category and categories #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Iago received a complaint via Facebook about a user trying to access category query.
That made me realize neither brand, nor category related queries were declared, so it was natural the user would received status 404.
I implemented those endpoints but I am still not very satisfied with some things:
It seems like the (catalog api)[https://documenter.getpostman.com/view/845/catalogsystem-102/Hs44#daa0c5ee-5c69-a192-7228-29a395726e70] returns weird data, for example, categories query return a list of categories, and each of them has the url attribute, but when searching for an specific category via category query it returns an object without the url attribute. Who might be responsible for that API ?
Second, I imported the slugify lib via package.json but I'm having trouble using it. Can you help me ? It's not a lib specific issue, because I've used this lib before, I don't know the details of how the TS is transpiled, so I may be referencing it wrong, look for 'slugify' in the changes and see if you can find something unusual in the way I'm using it.