From 5b72cc76e22d63b4debd8f60390ba8a450359d4d Mon Sep 17 00:00:00 2001 From: Naumann Date: Thu, 28 May 2020 15:56:51 +0200 Subject: [PATCH] bugfix in inventar --- Controllers/InventarController.cs | 4 ++-- Data/IInventarRepo.cs | 12 ------------ Data/IItemRepo.cs | 4 ++-- 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 Data/IInventarRepo.cs diff --git a/Controllers/InventarController.cs b/Controllers/InventarController.cs index 369f5b9..7b38c43 100644 --- a/Controllers/InventarController.cs +++ b/Controllers/InventarController.cs @@ -32,7 +32,7 @@ namespace BuecherwurmAPI.Controllers return Ok(new Item { Id = item.Id, - BookId = book.ProductId, + BookId = item.BookId, }); } @@ -60,7 +60,7 @@ namespace BuecherwurmAPI.Controllers { return NotFound(); } - _repository.DeleteItems(item); + _repository.DeleteItem(item); return NoContent(); } diff --git a/Data/IInventarRepo.cs b/Data/IInventarRepo.cs deleted file mode 100644 index 50bb73e..0000000 --- a/Data/IInventarRepo.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using BuecherwurmAPI.Models; - -namespace BuecherwurmAPI.Data -{ - public interface IInventarRepo - { - IEnumerable GetAllItems(); - Item GetItemById(int id); - void DeleteItem(Item item); - } -} \ No newline at end of file diff --git a/Data/IItemRepo.cs b/Data/IItemRepo.cs index 307a65d..e208ba1 100644 --- a/Data/IItemRepo.cs +++ b/Data/IItemRepo.cs @@ -7,7 +7,7 @@ namespace BuecherwurmAPI.Data { IEnumerable GetAllItems(); Item GetItemById(int id); - NewItem(Item item); - DeleteItem(int id); + void NewItem(Item item); + void DeleteItem(Item item); } } \ No newline at end of file