aboutsummaryrefslogtreecommitdiff
path: root/RhSolutions.SkuParser.Api
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2025-01-14 05:59:55 +0000
committerSerghei Cebotari <serghei@cebotari.ru>2025-01-14 05:59:55 +0000
commit7b6f2fedf1080c0ea96f4975f82700db3e12d783 (patch)
tree633b359c4c04f0b51c72beccc7d4c3348f7dc8ab /RhSolutions.SkuParser.Api
parent1b89c809651f58a0125b94c027699db32272b402 (diff)
Add devcontainers
Diffstat (limited to 'RhSolutions.SkuParser.Api')
-rw-r--r--RhSolutions.SkuParser.Api/Controllers/ProductsController.cs94
-rw-r--r--RhSolutions.SkuParser.Api/Models/Product.cs128
-rw-r--r--RhSolutions.SkuParser.Api/Models/ProductQuantity.cs60
-rw-r--r--RhSolutions.SkuParser.Api/Program.cs22
-rw-r--r--RhSolutions.SkuParser.Api/Properties/launchSettings.json58
-rw-r--r--RhSolutions.SkuParser.Api/RhSolutions.SkuParser.Api.csproj28
-rw-r--r--RhSolutions.SkuParser.Api/Services/CsvParser.cs48
-rw-r--r--RhSolutions.SkuParser.Api/Services/ExcelParser.cs152
-rw-r--r--RhSolutions.SkuParser.Api/Services/ISkuParser.cs14
-rw-r--r--RhSolutions.SkuParser.Api/appsettings.Development.json16
-rw-r--r--RhSolutions.SkuParser.Api/appsettings.json18
11 files changed, 319 insertions, 319 deletions
diff --git a/RhSolutions.SkuParser.Api/Controllers/ProductsController.cs b/RhSolutions.SkuParser.Api/Controllers/ProductsController.cs
index d85b01b..77b277b 100644
--- a/RhSolutions.SkuParser.Api/Controllers/ProductsController.cs
+++ b/RhSolutions.SkuParser.Api/Controllers/ProductsController.cs
@@ -1,48 +1,48 @@
-using Microsoft.AspNetCore.Mvc;
-using RhSolutions.SkuParser.Models;
-using RhSolutions.SkuParser.Services;
-
-namespace RhSolutions.SkuParser.Controllers;
-
-[ApiController]
-[Route("/api/[controller]")]
-public class ProductsController : ControllerBase
-{
- private IServiceProvider _provider;
- private Dictionary<Product, double> _result;
- public ProductsController(IServiceProvider provider)
- {
- _provider = provider;
- _result = new();
- }
-
- [HttpPost]
- public IActionResult PostFiles()
- {
- IFormFileCollection files = Request.Form.Files;
- try
- {
- foreach (var file in files)
- {
- ISkuParser parser = _provider.GetRequiredKeyedService<ISkuParser>(file.ContentType);
- IEnumerable<ProductQuantity> productQuantities = parser.ParseProducts(file);
- foreach (ProductQuantity pq in productQuantities)
- {
- if (_result.ContainsKey(pq.Product))
- {
- _result[pq.Product] += pq.Quantity;
- }
- else
- {
- _result.Add(pq.Product, pq.Quantity);
- }
- }
- }
- }
- catch (Exception ex)
- {
- return BadRequest(error: $"{ex.Message}\n\n{ex.Source}\n{ex.StackTrace}");
- }
- return new JsonResult(_result.Select(x => new { Sku = x.Key.ToString(), Quantity = x.Value }));
- }
+using Microsoft.AspNetCore.Mvc;
+using RhSolutions.SkuParser.Models;
+using RhSolutions.SkuParser.Services;
+
+namespace RhSolutions.SkuParser.Controllers;
+
+[ApiController]
+[Route("/api/[controller]")]
+public class ProductsController : ControllerBase
+{
+ private IServiceProvider _provider;
+ private Dictionary<Product, double> _result;
+ public ProductsController(IServiceProvider provider)
+ {
+ _provider = provider;
+ _result = new();
+ }
+
+ [HttpPost]
+ public IActionResult PostFiles()
+ {
+ IFormFileCollection files = Request.Form.Files;
+ try
+ {
+ foreach (var file in files)
+ {
+ ISkuParser parser = _provider.GetRequiredKeyedService<ISkuParser>(file.ContentType);
+ IEnumerable<ProductQuantity> productQuantities = parser.ParseProducts(file);
+ foreach (ProductQuantity pq in productQuantities)
+ {
+ if (_result.ContainsKey(pq.Product))
+ {
+ _result[pq.Product] += pq.Quantity;
+ }
+ else
+ {
+ _result.Add(pq.Product, pq.Quantity);
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ return BadRequest(error: $"{ex.Message}\n\n{ex.Source}\n{ex.StackTrace}");
+ }
+ return new JsonResult(_result.Select(x => new { Sku = x.Key.ToString(), Quantity = x.Value }));
+ }
} \ No newline at end of file
diff --git a/RhSolutions.SkuParser.Api/Models/Product.cs b/RhSolutions.SkuParser.Api/Models/Product.cs
index fd9ea45..26a7392 100644
--- a/RhSolutions.SkuParser.Api/Models/Product.cs
+++ b/RhSolutions.SkuParser.Api/Models/Product.cs
@@ -1,65 +1,65 @@
-using System.Text.RegularExpressions;
-
-namespace RhSolutions.SkuParser.Models;
-
-public record Product
-{
- /// <summary>
- /// Артикул РЕХАУ в заданном формате
- /// </summary>
- public required string Sku
- {
- get => _sku;
- set
- {
- _sku = IsValudSku(value)
- ? value
- : throw new ArgumentException("$Неверный артикул: {value}");
- }
- }
- private string _sku = string.Empty;
- private const string _parsePattern = @"(?<Lead>[1\s]|^|\b)(?<Article>\d{6})(?<Delimiter>[\s13-])(?<Variant>\d{3})(\b|$)";
- private const string _validnessPattern = @"^1\d{6}[1|3]\d{3}$";
-
- private static bool IsValudSku(string value)
- {
- return Regex.IsMatch(value.Trim(), _validnessPattern);
- }
- private static string GetSku(Match match)
- {
- string lead = match.Groups["Lead"].Value;
- string article = match.Groups["Article"].Value;
- string delimiter = match.Groups["Delimiter"].Value;
- string variant = match.Groups["Variant"].Value;
-
- if (lead != "1" && delimiter == "-")
- {
- return $"1{article}1{variant}";
- }
- else
- {
- return $"{lead}{article}{delimiter}{variant}";
- }
- }
-
- /// <summary>
- /// Проверка строки на наличие в ней артикула РЕХАУ
- /// </summary>
- /// <param name="value">Входная строка для проверки</param>
- /// <param name="product">Артикул, если найден. null - если нет</param>
- /// <returns>Если артикул в строке есть возвращает true, Если нет - false</returns>
- public static bool TryParse(string value, out Product? product)
- {
- product = null;
- MatchCollection matches = Regex.Matches(value, _parsePattern);
- if (matches.Count == 0)
- {
- return false;
- }
- string sku = GetSku(matches.First());
- product = new Product() { Sku = sku };
- return true;
- }
- public override int GetHashCode() => Sku.GetHashCode();
- public override string ToString() => Sku;
+using System.Text.RegularExpressions;
+
+namespace RhSolutions.SkuParser.Models;
+
+public record Product
+{
+ /// <summary>
+ /// Артикул РЕХАУ в заданном формате
+ /// </summary>
+ public required string Sku
+ {
+ get => _sku;
+ set
+ {
+ _sku = IsValudSku(value)
+ ? value
+ : throw new ArgumentException("$Неверный артикул: {value}");
+ }
+ }
+ private string _sku = string.Empty;
+ private const string _parsePattern = @"(?<Lead>[1\s]|^|\b)(?<Article>\d{6})(?<Delimiter>[\s13-])(?<Variant>\d{3})(\b|$)";
+ private const string _validnessPattern = @"^1\d{6}[1|3]\d{3}$";
+
+ private static bool IsValudSku(string value)
+ {
+ return Regex.IsMatch(value.Trim(), _validnessPattern);
+ }
+ private static string GetSku(Match match)
+ {
+ string lead = match.Groups["Lead"].Value;
+ string article = match.Groups["Article"].Value;
+ string delimiter = match.Groups["Delimiter"].Value;
+ string variant = match.Groups["Variant"].Value;
+
+ if (lead != "1" && delimiter == "-")
+ {
+ return $"1{article}1{variant}";
+ }
+ else
+ {
+ return $"{lead}{article}{delimiter}{variant}";
+ }
+ }
+
+ /// <summary>
+ /// Проверка строки на наличие в ней артикула РЕХАУ
+ /// </summary>
+ /// <param name="value">Входная строка для проверки</param>
+ /// <param name="product">Артикул, если найден. null - если нет</param>
+ /// <returns>Если артикул в строке есть возвращает true, Если нет - false</returns>
+ public static bool TryParse(string value, out Product? product)
+ {
+ product = null;
+ MatchCollection matches = Regex.Matches(value, _parsePattern);
+ if (matches.Count == 0)
+ {
+ return false;
+ }
+ string sku = GetSku(matches.First());
+ product = new Product() { Sku = sku };
+ return true;
+ }
+ public override int GetHashCode() => Sku.GetHashCode();
+ public override string ToString() => Sku;
} \ No newline at end of file
diff --git a/RhSolutions.SkuParser.Api/Models/ProductQuantity.cs b/RhSolutions.SkuParser.Api/Models/ProductQuantity.cs
index b7b154d..d593f8b 100644
--- a/RhSolutions.SkuParser.Api/Models/ProductQuantity.cs
+++ b/RhSolutions.SkuParser.Api/Models/ProductQuantity.cs
@@ -1,30 +1,30 @@
-using CsvHelper.Configuration.Attributes;
-
-namespace RhSolutions.SkuParser.Models;
-
-public class ProductQuantity
-{
- [Index(0)]
- public required Product Product { get; set; }
- [Index(1)]
- public required double Quantity { get; set; }
-
- public override bool Equals(object? obj)
- {
- if (obj == null || GetType() != obj.GetType())
- {
- return false;
- }
- ProductQuantity other = (ProductQuantity)obj;
- return Product == other.Product &&
- Quantity == other.Quantity;
- }
-
- public override int GetHashCode()
- {
- HashCode hash = new();
- hash.Add(Product);
- hash.Add(Quantity);
- return hash.ToHashCode();
- }
-}
+using CsvHelper.Configuration.Attributes;
+
+namespace RhSolutions.SkuParser.Models;
+
+public class ProductQuantity
+{
+ [Index(0)]
+ public required Product Product { get; set; }
+ [Index(1)]
+ public required double Quantity { get; set; }
+
+ public override bool Equals(object? obj)
+ {
+ if (obj == null || GetType() != obj.GetType())
+ {
+ return false;
+ }
+ ProductQuantity other = (ProductQuantity)obj;
+ return Product == other.Product &&
+ Quantity == other.Quantity;
+ }
+
+ public override int GetHashCode()
+ {
+ HashCode hash = new();
+ hash.Add(Product);
+ hash.Add(Quantity);
+ return hash.ToHashCode();
+ }
+}
diff --git a/RhSolutions.SkuParser.Api/Program.cs b/RhSolutions.SkuParser.Api/Program.cs
index 44c642a..e0acec8 100644
--- a/RhSolutions.SkuParser.Api/Program.cs
+++ b/RhSolutions.SkuParser.Api/Program.cs
@@ -1,12 +1,12 @@
-using RhSolutions.SkuParser.Services;
-
-var builder = WebApplication.CreateBuilder(args);
-builder.Services
- .AddKeyedScoped<ISkuParser, CsvParser>("text/csv")
- .AddKeyedScoped<ISkuParser, ExcelParser>("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
- .AddKeyedScoped<ISkuParser, ExcelParser>("application/vnd.ms-excel.sheet.macroenabled.12");
-builder.Services.AddControllers();
-
-var app = builder.Build();
-app.MapControllers();
+using RhSolutions.SkuParser.Services;
+
+var builder = WebApplication.CreateBuilder(args);
+builder.Services
+ .AddKeyedScoped<ISkuParser, CsvParser>("text/csv")
+ .AddKeyedScoped<ISkuParser, ExcelParser>("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
+ .AddKeyedScoped<ISkuParser, ExcelParser>("application/vnd.ms-excel.sheet.macroenabled.12");
+builder.Services.AddControllers();
+
+var app = builder.Build();
+app.MapControllers();
app.Run(); \ No newline at end of file
diff --git a/RhSolutions.SkuParser.Api/Properties/launchSettings.json b/RhSolutions.SkuParser.Api/Properties/launchSettings.json
index 09f4eae..002f6b7 100644
--- a/RhSolutions.SkuParser.Api/Properties/launchSettings.json
+++ b/RhSolutions.SkuParser.Api/Properties/launchSettings.json
@@ -1,29 +1,29 @@
-{
- "$schema": "http://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:8080",
- "sslPort": 44355
- }
- },
- "profiles": {
- "http": {
- "commandName": "Project",
- "dotnetRunMessages": true,
- "launchBrowser": false,
- "applicationUrl": "http://localhost:8080",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:8080",
+ "sslPort": 44355
+ }
+ },
+ "profiles": {
+ "http": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": false,
+ "applicationUrl": "http://localhost:8080",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/RhSolutions.SkuParser.Api/RhSolutions.SkuParser.Api.csproj b/RhSolutions.SkuParser.Api/RhSolutions.SkuParser.Api.csproj
index d6e06a1..a6b1c5b 100644
--- a/RhSolutions.SkuParser.Api/RhSolutions.SkuParser.Api.csproj
+++ b/RhSolutions.SkuParser.Api/RhSolutions.SkuParser.Api.csproj
@@ -1,14 +1,14 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- <TargetFramework>net8.0</TargetFramework>
- <Nullable>enable</Nullable>
- <ImplicitUsings>enable</ImplicitUsings>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="ClosedXML" Version="0.102.3" />
- <PackageReference Include="CsvHelper" Version="33.0.1" />
- </ItemGroup>
-
-</Project>
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+ <PropertyGroup>
+ <TargetFramework>net8.0</TargetFramework>
+ <Nullable>enable</Nullable>
+ <ImplicitUsings>enable</ImplicitUsings>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="ClosedXML" Version="0.102.3" />
+ <PackageReference Include="CsvHelper" Version="33.0.1" />
+ </ItemGroup>
+
+</Project>
diff --git a/RhSolutions.SkuParser.Api/Services/CsvParser.cs b/RhSolutions.SkuParser.Api/Services/CsvParser.cs
index 436a949..2776721 100644
--- a/RhSolutions.SkuParser.Api/Services/CsvParser.cs
+++ b/RhSolutions.SkuParser.Api/Services/CsvParser.cs
@@ -1,24 +1,24 @@
-using System.Globalization;
-using CsvHelper;
-using CsvHelper.Configuration;
-using RhSolutions.SkuParser.Models;
-
-namespace RhSolutions.SkuParser.Services;
-
-/// <summary>
-/// Парсер артикулов и их количества из файлов *.csv
-/// </summary>
-public class CsvParser : ISkuParser
-{
- public IEnumerable<ProductQuantity> ParseProducts(IFormFile file)
- {
- using StreamReader reader = new(file.OpenReadStream());
- var config = new CsvConfiguration(CultureInfo.GetCultureInfo("ru-RU"))
- {
- HasHeaderRecord = false,
- };
- using CsvReader csvReader = new(reader, config);
-
- return csvReader.GetRecords<ProductQuantity>().ToList();
- }
-}
+using System.Globalization;
+using CsvHelper;
+using CsvHelper.Configuration;
+using RhSolutions.SkuParser.Models;
+
+namespace RhSolutions.SkuParser.Services;
+
+/// <summary>
+/// Парсер артикулов и их количества из файлов *.csv
+/// </summary>
+public class CsvParser : ISkuParser
+{
+ public IEnumerable<ProductQuantity> ParseProducts(IFormFile file)
+ {
+ using StreamReader reader = new(file.OpenReadStream());
+ var config = new CsvConfiguration(CultureInfo.GetCultureInfo("ru-RU"))
+ {
+ HasHeaderRecord = false,
+ };
+ using CsvReader csvReader = new(reader, config);
+
+ return csvReader.GetRecords<ProductQuantity>().ToList();
+ }
+}
diff --git a/RhSolutions.SkuParser.Api/Services/ExcelParser.cs b/RhSolutions.SkuParser.Api/Services/ExcelParser.cs
index 27b10bd..fec3885 100644
--- a/RhSolutions.SkuParser.Api/Services/ExcelParser.cs
+++ b/RhSolutions.SkuParser.Api/Services/ExcelParser.cs
@@ -1,76 +1,76 @@
-using ClosedXML.Excel;
-using RhSolutions.SkuParser.Models;
-
-namespace RhSolutions.SkuParser.Services;
-
-public class ExcelParser : ISkuParser
-{
- public IEnumerable<ProductQuantity> ParseProducts(IFormFile file)
- {
- using XLWorkbook workbook = new(file.OpenReadStream());
- IXLWorksheet ws = workbook.Worksheet(1);
-
- var leftTop = ws.FirstCellUsed()?.Address;
- var rightBottom = ws.LastCellUsed()?.Address;
- if (new object?[] { leftTop, rightBottom }.Any(x => x == null))
- {
- throw new ArgumentException($"Таблица пуста: {file.FileName}");
- }
-
- var lookupRange = ws.Range(leftTop, rightBottom).RangeUsed();
- var columns = lookupRange.Columns();
-
- var skuColumnQuantity = columns
- .Select(column => new
- {
- Column = column,
- Products = column.CellsUsed()
- .Select(cell => !cell.HasFormula && Product.TryParse(cell.Value.ToString(), out Product? p) ? p : null)
- })
- .Select(c => new { c.Column, SkuCount = c.Products.Count(p => p != null) })
- .Aggregate((l, r) => l.SkuCount > r.SkuCount ? l : r);
- var skuColumn = skuColumnQuantity.SkuCount > 0 ? skuColumnQuantity.Column : null;
-
- if (skuColumn == null)
- {
- throw new ArgumentException($"Столбец с артикулом не определен: {file.FileName}");
- }
-
- var quantityColumn = lookupRange.Columns().Skip(skuColumn.ColumnNumber())
- .Select(column => new
- {
- Column = column,
- IsColumnWithNumbers = column.CellsUsed()
- .Count(cell => cell.Value.IsNumber == true) > column.CellsUsed().Count() / 4
- })
- .First(x => x.IsColumnWithNumbers)
- .Column;
-
- if (quantityColumn == null)
- {
- throw new ArgumentException($"Столбец с количеством не определен: {file.FileName}");
- }
-
- List<ProductQuantity> result = new();
- var rows = quantityColumn.CellsUsed().Select(x => x.Address.RowNumber);
-
- foreach (var row in rows)
- {
- var quantity = quantityColumn.Cell(row).Value;
- var sku = skuColumn.Cell(row).Value;
-
- if (quantity.IsNumber
- && Product.TryParse(sku.ToString(), out Product? p))
- {
- ProductQuantity pq = new()
- {
- Product = p!,
- Quantity = quantity.GetNumber()
- };
- result.Add(pq);
- }
- }
-
- return result;
- }
-}
+using ClosedXML.Excel;
+using RhSolutions.SkuParser.Models;
+
+namespace RhSolutions.SkuParser.Services;
+
+public class ExcelParser : ISkuParser
+{
+ public IEnumerable<ProductQuantity> ParseProducts(IFormFile file)
+ {
+ using XLWorkbook workbook = new(file.OpenReadStream());
+ IXLWorksheet ws = workbook.Worksheet(1);
+
+ var leftTop = ws.FirstCellUsed()?.Address;
+ var rightBottom = ws.LastCellUsed()?.Address;
+ if (new object?[] { leftTop, rightBottom }.Any(x => x == null))
+ {
+ throw new ArgumentException($"Таблица пуста: {file.FileName}");
+ }
+
+ var lookupRange = ws.Range(leftTop, rightBottom).RangeUsed();
+ var columns = lookupRange.Columns();
+
+ var skuColumnQuantity = columns
+ .Select(column => new
+ {
+ Column = column,
+ Products = column.CellsUsed()
+ .Select(cell => !cell.HasFormula && Product.TryParse(cell.Value.ToString(), out Product? p) ? p : null)
+ })
+ .Select(c => new { c.Column, SkuCount = c.Products.Count(p => p != null) })
+ .Aggregate((l, r) => l.SkuCount > r.SkuCount ? l : r);
+ var skuColumn = skuColumnQuantity.SkuCount > 0 ? skuColumnQuantity.Column : null;
+
+ if (skuColumn == null)
+ {
+ throw new ArgumentException($"Столбец с артикулом не определен: {file.FileName}");
+ }
+
+ var quantityColumn = lookupRange.Columns().Skip(skuColumn.ColumnNumber())
+ .Select(column => new
+ {
+ Column = column,
+ IsColumnWithNumbers = column.CellsUsed()
+ .Count(cell => cell.Value.IsNumber == true) > column.CellsUsed().Count() / 4
+ })
+ .First(x => x.IsColumnWithNumbers)
+ .Column;
+
+ if (quantityColumn == null)
+ {
+ throw new ArgumentException($"Столбец с количеством не определен: {file.FileName}");
+ }
+
+ List<ProductQuantity> result = new();
+ var rows = quantityColumn.CellsUsed().Select(x => x.Address.RowNumber);
+
+ foreach (var row in rows)
+ {
+ var quantity = quantityColumn.Cell(row).Value;
+ var sku = skuColumn.Cell(row).Value;
+
+ if (quantity.IsNumber
+ && Product.TryParse(sku.ToString(), out Product? p))
+ {
+ ProductQuantity pq = new()
+ {
+ Product = p!,
+ Quantity = quantity.GetNumber()
+ };
+ result.Add(pq);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/RhSolutions.SkuParser.Api/Services/ISkuParser.cs b/RhSolutions.SkuParser.Api/Services/ISkuParser.cs
index 98b9d9c..4329135 100644
--- a/RhSolutions.SkuParser.Api/Services/ISkuParser.cs
+++ b/RhSolutions.SkuParser.Api/Services/ISkuParser.cs
@@ -1,7 +1,7 @@
-using RhSolutions.SkuParser.Models;
-
-namespace RhSolutions.SkuParser.Services;
-public interface ISkuParser
-{
- public IEnumerable<ProductQuantity> ParseProducts(IFormFile file);
-}
+using RhSolutions.SkuParser.Models;
+
+namespace RhSolutions.SkuParser.Services;
+public interface ISkuParser
+{
+ public IEnumerable<ProductQuantity> ParseProducts(IFormFile file);
+}
diff --git a/RhSolutions.SkuParser.Api/appsettings.Development.json b/RhSolutions.SkuParser.Api/appsettings.Development.json
index 0c208ae..ff66ba6 100644
--- a/RhSolutions.SkuParser.Api/appsettings.Development.json
+++ b/RhSolutions.SkuParser.Api/appsettings.Development.json
@@ -1,8 +1,8 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- }
-}
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/RhSolutions.SkuParser.Api/appsettings.json b/RhSolutions.SkuParser.Api/appsettings.json
index 10f68b8..4d56694 100644
--- a/RhSolutions.SkuParser.Api/appsettings.json
+++ b/RhSolutions.SkuParser.Api/appsettings.json
@@ -1,9 +1,9 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "AllowedHosts": "*"
-}
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}