bugfix in inventar

This commit is contained in:
Naumann 2020-05-28 15:56:51 +02:00
parent f16154cf0a
commit 5b72cc76e2
3 changed files with 4 additions and 16 deletions

View file

@ -32,7 +32,7 @@ namespace BuecherwurmAPI.Controllers
return Ok(new Item return Ok(new Item
{ {
Id = item.Id, Id = item.Id,
BookId = book.ProductId, BookId = item.BookId,
}); });
} }
@ -60,7 +60,7 @@ namespace BuecherwurmAPI.Controllers
{ {
return NotFound(); return NotFound();
} }
_repository.DeleteItems(item); _repository.DeleteItem(item);
return NoContent(); return NoContent();
} }

View file

@ -1,12 +0,0 @@
using System.Collections.Generic;
using BuecherwurmAPI.Models;
namespace BuecherwurmAPI.Data
{
public interface IInventarRepo
{
IEnumerable<Item> GetAllItems();
Item GetItemById(int id);
void DeleteItem(Item item);
}
}

View file

@ -7,7 +7,7 @@ namespace BuecherwurmAPI.Data
{ {
IEnumerable<Item> GetAllItems(); IEnumerable<Item> GetAllItems();
Item GetItemById(int id); Item GetItemById(int id);
NewItem(Item item); void NewItem(Item item);
DeleteItem(int id); void DeleteItem(Item item);
} }
} }