You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after swagger and the client generation branches the validator does not work after a successful product is validated, it fails a bad sku or price fine. keeps returning empty requests on posts and puts. A giant refactor without vids to back it up 👎
this is code that i used git clone with no code I typed myself up to episode 8 i was typing it out and it was great for learning 👍
The text was updated successfully, but these errors were encountered:
@jwaldner POST can be fixed with this update. I've checked it and it does work properly.
At the same time I struggle to make PUT work. It keeps overriding the very first product (with ID 0) and it doesn't throw any errors if I try to update some non-existing product, which I thought is already covered with var ErrInvalidProductPath = fmt.Errorf("invalid Path, path should be /products/[id]") from handlers/products.go.
@jwaldner The PUT method doesn't work as intended because we never get the real ID of a product. The ID passed in with the context is only a placeholder and equals always to zero. To access the real value, we need to extract it from the URL with the help of getProductID function, which is also used inside DELETE handler. So it can be fixed with those minor changes (all we need is to get the real product ID):
after swagger and the client generation branches the validator does not work after a successful product is validated, it fails a bad sku or price fine. keeps returning empty requests on posts and puts. A giant refactor without vids to back it up 👎
this is code that i used git clone with no code I typed myself up to episode 8 i was typing it out and it was great for learning 👍
The text was updated successfully, but these errors were encountered: