Skip to content

Commit

Permalink
feat(cart): translations
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobritodev committed Aug 6, 2021
1 parent dee07a2 commit 88acee8
Show file tree
Hide file tree
Showing 68 changed files with 52 additions and 1,267 deletions.
Binary file modified DevStore.sln
Binary file not shown.
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Configuration/GrpcConfig.cs
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/DevStore.Bff.Compras.csproj
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Models/PedidoDTO.cs
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Models/VoucherDTO.cs
Binary file not shown.
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Services/CatalogService.cs
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Services/ClienteService.cs
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Services/PedidoService.cs
Binary file not shown.
Binary file modified src/api gateways/DevStore.Bff.Compras/Services/Service.cs
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
}
},
"AllowedHosts": "*",
"CarrinhoUrl": "https://localhost:55201",
"CatalogoUrl": "https://localhost:55301",
"ShoppingCartUrl": "https://localhost:55201",
"CatalogUrl": "https://localhost:55301",
"ClienteUrl": "https://localhost:55401",
"PagamentoUrl": "https://localhost:55601",
"PedidoUrl": "https://localhost:55701",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
}
},
"AllowedHosts": "*",
"CarrinhoUrl": "https://devstore-api-carrinho:5201",
"CatalogoUrl": "https://devstore-api-catalogo:5301",
"ShoppingCartUrl": "https://devstore-api-carrinho:5201",
"CatalogUrl": "https://devstore-api-catalogo:5301",
"ClienteUrl": "https://devstore-api-cliente:5401",
"PagamentoUrl": "https://devstore-api-pagamento:5601",
"PedidoUrl": "https://devstore-api-pedido:5701",
Expand Down
10 changes: 5 additions & 5 deletions src/services/DevStore.Carrinho.API/Configuration/ApiConfig.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DevStore.Carrinho.API.Data;
using DevStore.Carrinho.API.Services.gRPC;
using DevStore.ShoppingCart.API.Data;
using DevStore.ShoppingCart.API.Services.gRPC;
using DevStore.WebAPI.Core.Identidade;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
Expand All @@ -8,13 +8,13 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace DevStore.Carrinho.API.Configuration
namespace DevStore.ShoppingCart.API.Configuration
{
public static class ApiConfig
{
public static void AddApiConfiguration(this IServiceCollection services, IConfiguration configuration)
{
services.AddDbContext<CarrinhoContext>(options =>
services.AddDbContext<Data.ShoppingCartContext>(options =>
options.UseSqlServer(configuration.GetConnectionString("DefaultConnection")));

services.AddControllers();
Expand Down Expand Up @@ -50,7 +50,7 @@ public static void UseApiConfiguration(this IApplicationBuilder app, IWebHostEnv
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapGrpcService<CarrinhoGrpcService>().RequireCors("Total");
endpoints.MapGrpcService<ShoppingCartGrpcService>().RequireCors("Total");
});
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using DevStore.Carrinho.API.Data;
using System;
using System.Threading.Tasks;
using DevStore.ShoppingCart.API.Data;
using DevStore.WebAPI.Core.Configuration;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Threading.Tasks;

namespace DevStore.Carrinho.API.Configuration
namespace DevStore.ShoppingCart.API.Configuration
{

public static class DbMigrationHelpers
Expand All @@ -28,7 +28,7 @@ public static async Task EnsureSeedData(IServiceProvider serviceProvider)
var env = scope.ServiceProvider.GetRequiredService<IWebHostEnvironment>();

//var configuration = scope.ServiceProvider.GetRequiredService<IConfiguration>();
var context = scope.ServiceProvider.GetRequiredService<CarrinhoContext>();
var context = scope.ServiceProvider.GetRequiredService<Data.ShoppingCartContext>();

await DbHealthChecker.TestConnection(context);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using DevStore.Carrinho.API.Data;
using DevStore.ShoppingCart.API.Data;
using DevStore.WebAPI.Core.Usuario;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;

namespace DevStore.Carrinho.API.Configuration
namespace DevStore.ShoppingCart.API.Configuration
{
public static class DependencyInjectionConfig
{
public static void RegisterServices(this IServiceCollection services)
{
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.AddScoped<IAspNetUser, AspNetUser>();
services.AddScoped<CarrinhoContext>();
services.AddScoped<Data.ShoppingCartContext>();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using DevStore.Carrinho.API.Services;
using DevStore.Core.Utils;
using DevStore.Core.Utils;
using DevStore.MessageBus;
using DevStore.ShoppingCart.API.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace DevStore.Carrinho.API.Configuration
namespace DevStore.ShoppingCart.API.Configuration
{
public static class MessageBusConfig
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using System;

namespace DevStore.Carrinho.API.Configuration
namespace DevStore.ShoppingCart.API.Configuration
{
public static class SwaggerConfig
{
Expand All @@ -13,15 +13,15 @@ public static void AddSwaggerConfiguration(this IServiceCollection services)
{
c.SwaggerDoc("v1", new OpenApiInfo()
{
Title = "DevStore Enterprise Carrinho API",
Description = "Esta API faz parte do curso ASP.NET Core Enterprise Applications.",
Contact = new OpenApiContact() {Name = "Eduardo Pires", Email = "[email protected]"},
License = new OpenApiLicense() {Name = "MIT", Url = new Uri("https://opensource.org/Licenses/MIT")}
Title = "DevStore Enterprise Shopping Cart API",
Description = "This API is part of online course ASP.NET Core Enterprise Applications.",
Contact = new OpenApiContact() { Name = "Eduardo Pires", Email = "[email protected]" },
License = new OpenApiLicense() { Name = "MIT", Url = new Uri("https://opensource.org/Licenses/MIT") }
});

c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
Description = "Insira o token JWT desta maneira: Bearer {seu token}",
Description = "Add you JWT token: Bearer {token}",
Name = "Authorization",
Scheme = "Bearer",
BearerFormat = "JWT",
Expand Down
171 changes: 0 additions & 171 deletions src/services/DevStore.Carrinho.API/Controllers/CarrinhoController.cs

This file was deleted.

59 changes: 0 additions & 59 deletions src/services/DevStore.Carrinho.API/Data/CarrinhoContext.cs

This file was deleted.

Loading

0 comments on commit 88acee8

Please sign in to comment.