Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing endpoints brand, category and categories #8

Merged
merged 2 commits into from Dec 21, 2017

Conversation

marcelotokarnia
Copy link
Contributor

@marcelotokarnia marcelotokarnia commented Dec 15, 2017

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.

import paths from './../paths'
import slugify from 'slugify'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use import * as slugify from 'slugify'.

Take a look here: microsoft/TypeScript#16093

Fortunately Typescript 2.7 will behave just like Babel and we won't have to worry about that anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

knew I was missing something
thanks for the tip

@brunoabreu
Copy link
Contributor

LGTM

@marcelotokarnia marcelotokarnia merged commit 7e18336 into master Dec 21, 2017
@marcelotokarnia marcelotokarnia deleted the fix/missing-endpoints branch December 21, 2017 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants