Swagger docs

This commit is contained in:
Kun Deng
2022-09-05 16:58:10 -04:00
parent 664b0d520b
commit 38c056cc99
13 changed files with 83 additions and 35 deletions
+4 -3
View File
@@ -35,7 +35,8 @@ namespace Icarus.Controllers.V1
#region HTTP Routes
public IActionResult Get()
[HttpGet]
public IActionResult GetCoverArts()
{
var coverArtContext = new CoverArtContext(_connectionString);
@@ -54,7 +55,7 @@ namespace Icarus.Controllers.V1
}
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
public IActionResult GetCoverArt(int id)
{
var coverArt = new CoverArt { CoverArtID = id };
@@ -65,7 +66,7 @@ namespace Icarus.Controllers.V1
if (coverArt != null)
{
_logger.LogInformation("Found cover art record");
var coverArtBytes = await System.IO.File.ReadAllBytesAsync(
var coverArtBytes = System.IO.File.ReadAllBytes(
coverArt.ImagePath);
return File(coverArtBytes, "application/x-msdownload",