Skip to content

Commit

Permalink
Fix description not passed when adding a new product.
Browse files Browse the repository at this point in the history
  • Loading branch information
damienzeng73 committed Dec 14, 2017
1 parent d812d7c commit 044f8ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/actions/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const updateProduct = (productId, productData) => {

export const addNewProduct = (productData) => {
return dispatch => {
axios.post('/api/products/', {category: productData.category, name: productData.name, price: productData.price, quantity: productData.quantity, image_url: productData.imageUrl})
axios.post('/api/products/', {category: productData.category, name: productData.name, price: productData.price, quantity: productData.quantity, description: productData.description, image_url: productData.imageUrl})
.then((res) => {
toastr.success(`Product ${productData.name} added successfully.`)
dispatch(fetchProducts())
Expand Down

0 comments on commit 044f8ad

Please sign in to comment.