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
@@ -14,6 +14,7 @@ namespace Icarus.Controllers.V1
{
[Route("api/v1/album")]
[ApiController]
[Authorize]
public class AlbumController : BaseController
{
#region Fields
@@ -40,11 +41,6 @@ namespace Icarus.Controllers.V1
[HttpGet]
public IActionResult Get()
{
if (!IsTokenValid("read:albums"))
{
return StatusCode(401, "Not allowed");
}
List<Album> albums = new List<Album>();
var albumContext = new AlbumContext(_connectionString);
@@ -60,11 +56,6 @@ namespace Icarus.Controllers.V1
[HttpGet("{id}")]
public IActionResult Get(int id)
{
if (!IsTokenValid("read:albums"))
{
return StatusCode(401, "Not allowed");
}
Album album = new Album
{
AlbumID = id