@@ -23,7 +23,7 @@ module.exports = {
let recipe = new Recipe({
merchant: res.locals.merchant._id,
name: req.body.name,
- price: Math.round(req.body.price * 100),
+ price: req.body.price,
ingredients: req.body.ingredients
});
@@ -56,7 +56,7 @@ let newRecipe = {
submit: function(){
let data = {
name: document.getElementById("newRecipeName").value,
- price: document.getElementById("newRecipePrice").value,
+ price: parseInt(document.getElementById("newRecipePrice").value * 100),
ingredients: []
};