From ec36772cf8cfe773b5412306f4bf9dbe2852e4c4 Mon Sep 17 00:00:00 2001 From: Sychev Igor Date: Thu, 14 Dec 2017 14:32:03 +0300 Subject: [PATCH] mongo 2.5 (prep for retryable writes) and some small fixes --- ...icrosoft.Extensions.HealthChecks.SqlServer.csproj | 2 +- .../Location/Locations.API/Locations.API.csproj | 8 ++++---- .../Marketing/Marketing.API/Dto/UserLocationDTO.cs | 1 - .../Filters/AuthorizeCheckOperationFilter.cs | 12 ++++++------ .../MarketingMigrations/20170615163431_Init.cs | 1 - .../20170629102516_added-campaign-details.cs | 4 +--- .../MarketingContextModelSnapshot.cs | 2 -- .../Middlewares/ByPassAuthMiddleware.cs | 1 - .../Repositories/MarketingDataRepository.cs | 4 ---- .../Marketing/Marketing.API/Marketing.API.csproj | 8 ++++---- .../Marketing/Marketing.API/Model/Location.cs | 9 +-------- .../Marketing/Marketing.API/Model/MarketingData.cs | 2 -- .../Ordering/Ordering.API/Ordering.API.csproj | 2 +- 13 files changed, 18 insertions(+), 38 deletions(-) diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj index 60017a85f..0aef3c907 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Services/Location/Locations.API/Locations.API.csproj b/src/Services/Location/Locations.API/Locations.API.csproj index 5ec9a47a3..3ae6ecf0f 100644 --- a/src/Services/Location/Locations.API/Locations.API.csproj +++ b/src/Services/Location/Locations.API/Locations.API.csproj @@ -12,10 +12,10 @@ - - - - + + + + diff --git a/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs b/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs index aee043f82..3400b0dda 100644 --- a/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs +++ b/src/Services/Marketing/Marketing.API/Dto/UserLocationDTO.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Dto { public class UserLocationDTO diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs index d1540ba3a..2b4e15188 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs @@ -1,10 +1,8 @@ using Microsoft.AspNetCore.Authorization; using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; -using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filters { @@ -21,11 +19,13 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filt operation.Responses.Add("401", new Response { Description = "Unauthorized" }); operation.Responses.Add("403", new Response { Description = "Forbidden" }); - operation.Security = new List>>(); - operation.Security.Add(new Dictionary> + operation.Security = new List>> { - { "oauth2", new [] { "marketingapi" } } - }); + new Dictionary> + { + { "oauth2", new [] { "marketingapi" } } + } + }; } } } diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs index e4e33f060..92398f1a8 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170615163431_Init.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs index 9d6ddf399..5b7c7ef6c 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations { diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs index 3866a63ab..a79055954 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs @@ -2,8 +2,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations { diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index ed7eaf594..d89e15a7c 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Primitives; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs index 19d264a4e..4e531a84c 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/Repositories/MarketingDataRepository.cs @@ -1,10 +1,6 @@ using Microsoft.eShopOnContainers.Services.Marketing.API.Model; using Microsoft.Extensions.Options; -using MongoDB.Bson; using MongoDB.Driver; -using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj index 1ed41a2a4..85cfcee1d 100644 --- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj +++ b/src/Services/Marketing/Marketing.API/Marketing.API.csproj @@ -26,10 +26,10 @@ - - - - + + + + diff --git a/src/Services/Marketing/Marketing.API/Model/Location.cs b/src/Services/Marketing/Marketing.API/Model/Location.cs index 0e3e19c1a..6738e1dcf 100644 --- a/src/Services/Marketing/Marketing.API/Model/Location.cs +++ b/src/Services/Marketing/Marketing.API/Model/Location.cs @@ -1,11 +1,4 @@ -using MongoDB.Bson; -using MongoDB.Bson.Serialization.Attributes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model +namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model { public class Location { diff --git a/src/Services/Marketing/Marketing.API/Model/MarketingData.cs b/src/Services/Marketing/Marketing.API/Model/MarketingData.cs index 9f1f355b8..638bffac6 100644 --- a/src/Services/Marketing/Marketing.API/Model/MarketingData.cs +++ b/src/Services/Marketing/Marketing.API/Model/MarketingData.cs @@ -2,8 +2,6 @@ using MongoDB.Bson.Serialization.Attributes; using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model { diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj index f5b55c866..00ab4e473 100644 --- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj +++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj @@ -30,7 +30,7 @@ - +