Refactoring
This commit is contained in:
1 parent
b529731c95
commit
aa0a1ab5fe
8 files changed
+400
-413
No files matched your search
@@ -88,11 +88,13 @@ namespace Icarus.Controllers.V1
|
||||
Console.WriteLine("Retrieving filepath of song");
|
||||
_logger.LogInformation("Retrieving filepath of song");
|
||||
|
||||
if (!context.DoesRecordExist(song))
|
||||
if (!_songMgr.DoesSongExist(song))
|
||||
{
|
||||
return NotFound(new SongResult
|
||||
{
|
||||
Message = "Song does not exist"
|
||||
Message = "Song does not exist"
|
||||
});
|
||||
}
|
||||
|
||||
var songRes = _songMgr.UpdateSong(song);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Icarus.Controllers.V1
|
||||
|
||||
|
||||
|
||||
[HttpGet("{id}")]
|
||||
[HttpGet("download/{id}")]
|
||||
[Route("private-scoped")]
|
||||
[Authorize("download:songs")]
|
||||
public async Task<IActionResult> Get(int id)
|
||||
@@ -93,7 +93,7 @@ namespace Icarus.Controllers.V1
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
[HttpDelete("{id}")]
|
||||
[HttpDelete("delete/{id}")]
|
||||
[Authorize("delete:songs")]
|
||||
public IActionResult Delete(int id)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user