update - DELETE auskommentiert und angepasst

This commit is contained in:
David Renner 2020-05-28 10:10:32 +02:00
parent 7f5ca580c6
commit defdceaf24
3 changed files with 1032 additions and 5 deletions

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -54,16 +54,16 @@ namespace BuecherwurmAPI.Controllers
}
// DELETE katalog/{id}
// DELETE inventory/{id}
/*[HttpDelete("id")]
public ActionResult<IEnumerable<Book>> BuchEntfernen(int id)
public ActionResult<IEnumerable<Copy>> ExemplarEntfernen(int id)
{
var book = _repository.GetBookById(id);
if (book == null)
var copy = _repository.GetCopyById(id);
if (copy == null)
{
return NotFound();
}
_repository.BuchEntfernen(book);
_repository.ExemplarEntfernen(copy);
return NoContent();
}*/