This commit is contained in:
2020-08-10 21:44:52 +00:00
parent 6ce9ce4d8f
commit afdcd97bb9
3 changed files with 15 additions and 4 deletions

View File

@@ -85,15 +85,19 @@ namespace AyaNova.Api.Controllers
switch (size)
{
case "small":
if (logo.Small == null)
return NotFound();
return new FileStreamResult(new MemoryStream(logo.Small), Microsoft.Net.Http.Headers.MediaTypeHeaderValue.Parse(logo.SmallType));
case "medium":
if (logo.Medium == null)
return NotFound();
return new FileStreamResult(new MemoryStream(logo.Medium), Microsoft.Net.Http.Headers.MediaTypeHeaderValue.Parse(logo.MediumType));
case "large":
if (logo.Large == null)
return NotFound();
return new FileStreamResult(new MemoryStream(logo.Large), Microsoft.Net.Http.Headers.MediaTypeHeaderValue.Parse(logo.LargeType));
}
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
}