Song Count for corresponding tables are calcuated when retrieved #47

This commit is contained in:
amazing-username
2019-05-25 20:48:40 +00:00
parent e1627b04b9
commit c8578ae8c8
7 changed files with 478 additions and 164 deletions
+3 -2
View File
@@ -75,6 +75,8 @@ namespace Icarus.Controllers
Song song = context.GetSong(id);
Console.WriteLine("Here");
if (song.Id != 0)
{
return Ok(song);
@@ -85,9 +87,8 @@ namespace Icarus.Controllers
}
}
[HttpPut("{id}")]
[Authorize("update:songs")]
[HttpPut("{id}")]
public IActionResult Put(int id, [FromBody] Song song)
{
MusicStoreContext context = HttpContext