diff --git a/lib/Controller/GroceryListController.php b/lib/Controller/GroceryListController.php index b445f9e..3fcd381 100644 --- a/lib/Controller/GroceryListController.php +++ b/lib/Controller/GroceryListController.php @@ -255,8 +255,8 @@ public function addItem(string $name, string $quantity, int $category, int $list public function updateItem(int $id, string $name, string $quantity, int $category) { $item = $this->itemMapper->find($id); - $item->setName($name); - $item->setQuantity($quantity); + $item->setName(trim($name)); + $item->setQuantity(trim($quantity)); $item->setCategory($category); return new DataResponse($this->itemMapper->update($item)); diff --git a/src/views/GroceryList.vue b/src/views/GroceryList.vue index 8301221..c4e1c70 100644 --- a/src/views/GroceryList.vue +++ b/src/views/GroceryList.vue @@ -86,7 +86,7 @@