0
0

Fix Post method exception

This commit is contained in:
Sergey Chebotar 2022-12-18 11:58:29 +03:00
parent da94ed6d89
commit 402ffae02d
2 changed files with 1 additions and 21 deletions

View File

@ -45,7 +45,7 @@ namespace RhSolutions.Api.Controllers
} }
dbContext.SaveChanges(); dbContext.SaveChanges();
return Ok(products); return Ok();
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -5,19 +5,6 @@ namespace RhSolutions.Api.Services
{ {
public class ClosedXMLParser : IPricelistParser public class ClosedXMLParser : IPricelistParser
{ {
// HttpContext? context;
// XLWorkbook? wb;
// public ClosedXMLParser(IHttpContextAccessor accessor)
// {
// this.context = accessor.HttpContext;
// }
// public void Dispose()
// {
// wb?.Dispose();
// }
public async IAsyncEnumerable<Product> GetProducts(HttpContext context) public async IAsyncEnumerable<Product> GetProducts(HttpContext context)
{ {
using (var memoryStream = new MemoryStream()) using (var memoryStream = new MemoryStream())
@ -45,13 +32,6 @@ namespace RhSolutions.Api.Services
} }
} }
} }
// private async Task<XLWorkbook> GetWorkbook(HttpContext context)
// {
// using var memoryStream = new MemoryStream();
// return ;
// }
private IXLTable GetTable(XLWorkbook wb) private IXLTable GetTable(XLWorkbook wb)
{ {
var ws = wb.Worksheets.First(); var ws = wb.Worksheets.First();