Ovi / DummyJSON

DummyJSON.com provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend.
http://dummyjson.com
Other
1.87k stars 202 forks source link

unique ids when adding new products #56

Closed nuclearfartz closed 9 months ago

nuclearfartz commented 9 months ago

hi there , i created a website using Dummyjsons products and i am using the addproduct method mentioned in the docs but all new added products have the same id and i tried everything and it didnt work , here is whats showing in the console

{id: 101, title: 'test', price: '2', thumbnail: '1', description: '1'} description : "1" id : 101 price : "2" thumbnail : "1" title : "test" [[Prototype]] : Object App.js:109 Product added successfully! App.js:113 {id: 101, title: 'test2', price: '2', thumbnail: '2', description: '2'} description : "2" id : 101 price : "2" thumbnail : "2" title : "test2" [[Prototype]] : Object

Ovi commented 9 months ago

Related https://github.com/Ovi/DummyJSON/issues/28