This commit is contained in:
Kun Deng
2022-09-04 20:45:17 -04:00
parent d5944c470b
commit 05b5de0939
11 changed files with 7 additions and 128 deletions
+1 -10
View File
@@ -15,6 +15,7 @@ namespace Icarus.Controllers.V1
{
[Route("api/v1/coverart")]
[ApiController]
[Authorize]
public class CoverArtController : BaseController
{
#region Fields
@@ -36,11 +37,6 @@ namespace Icarus.Controllers.V1
#region HTTP Routes
public IActionResult Get()
{
if (!IsTokenValid("read:songs"))
{
return StatusCode(401, "Not allowed");
}
var coverArtContext = new CoverArtContext(_connectionString);
var coverArtRecords = coverArtContext.CoverArtImages.ToList();
@@ -60,11 +56,6 @@ namespace Icarus.Controllers.V1
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
{
if (!IsTokenValid("download:cover_art"))
{
return StatusCode(401, "Not allowed");
}
var coverArt = new CoverArt { CoverArtID = id };
var coverArtContext = new CoverArtContext(_connectionString);