Implemented functionality for retrieving all song details

This commit is contained in:
amazing-username
2019-03-31 18:13:27 -04:00
parent 798db84ce9
commit 1f15fe99e5
3 changed files with 91 additions and 7 deletions
+1 -5
View File
@@ -35,17 +35,16 @@ namespace Icarus.Controllers
#endregion
// GET api/song
[HttpGet]
public ActionResult<IEnumerable<Song>> Get()
{
List<Song> songs = new List<Song>();
songs = _songMgr.RetrieveAllSongDetails().Result;
return songs;
}
// GET api/song/5
[HttpGet("{id}")]
public ActionResult<Song> Get(int id)
{
@@ -54,20 +53,17 @@ namespace Icarus.Controllers
return song;
}
// POST api/song
[HttpPost]
public void Post([FromBody] Song song)
{
_songMgr.SaveSongDetails(song);
}
// PUT api/song/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] Song song)
{
}
// DELETE api/song/5
[HttpDelete("{id}")]
public void Delete(int id)
{