Skip to content

Commit

Permalink
feat: remove SQL Queries (#33)
Browse files Browse the repository at this point in the history
* fix: healthchecker [skip_ci]

* fix: change SQL to Linq
  • Loading branch information
brunobritodev authored Nov 6, 2023
1 parent cc5006f commit e5f2a25
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
Binary file not shown.
Binary file modified src/services/DevStore.Orders.Domain/Orders/IOrderRepository.cs
Binary file not shown.
Binary file modified src/services/DevStore.Orders.Infra/Repository/OrderRepository.cs
Binary file not shown.
8 changes: 4 additions & 4 deletions src/web/DevStore.WebApp.Status/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
var healthCheckBuilder = builder.Services.AddHealthChecksUI(setupSettings: setup =>
{
setup.SetHeaderText("DevStore - Status Page");
var endpoints = builder.Configuration.GetSection("ENDPOINTS").Get<List<string>>();
var endpoints = builder.Configuration.GetSection("ENDPOINTS").Get<string>();

foreach (var endpoint in endpoints)
foreach (var endpoint in endpoints.Split(";"))
{
var name = endpoint.Split(';')[0];
var uri = endpoint.Split(';')[1];
var name = endpoint.Split('|')[0];
var uri = endpoint.Split('|')[1];

setup.AddHealthCheckEndpoint(name, uri);
}
Expand Down
11 changes: 1 addition & 10 deletions src/web/DevStore.WebApp.Status/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,5 @@
//"DefaultConnection": "Data Source=DSStatus.db"

},
"ENDPOINTS": [
"Frontend Web;https://localhost:5401/healthz-infra",
"Shopping Cart API;https://localhost:5411/healthz-infra",
"Identity API;https://localhost:5421/healthz-infra",
"Catalog API;https://localhost:5431/healthz-infra",
"Customer API;https://localhost:5441/healthz-infra",
"BFF Checkout;https://localhost:5451/healthz-infra",
"Billing API;https://localhost:5461/healthz-infra",
"Order API;https://localhost:5471/healthz-infra"
]
"ENDPOINTS": "Frontend Web|https://localhost:5401/healthz-infra;Shopping Cart API|https://localhost:5411/healthz-infra;Identity API|https://localhost:5421/healthz-infra;Catalog API|https://localhost:5431/healthz-infra;Customer API|https://localhost:5441/healthz-infra;BFF Checkout|https://localhost:5451/healthz-infra;Billing API|https://localhost:5461/healthz-infra;Order API|https://localhost:5471/healthz-infra"
}
11 changes: 1 addition & 10 deletions src/web/DevStore.WebApp.Status/appsettings.Docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,5 @@
"ConnectionStrings": {
"DefaultConnection": "Server=database-status;Database=DSStatus;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
},
"ENDPOINTS": [
"Identity API;https://api-identity/healthz-infra",
"BFF Checkout;https://api-bff-checkout/healthz-infra",
"Frontend Web;https://web-mvc/healthz-infra",
"Shopping Cart API;https://api-cart/healthz-infra",
"Catalog API;https://api-catalog/healthz-infra",
"Customer API;https://api-customers/healthz-infra",
"Billing API;https://api-billing/healthz-infra",
"Order API;https://api-order/healthz-infra"
]
"ENDPOINTS": "Identity API|https://api-identity/healthz-infra;BFF Checkout|https://api-bff-checkout/healthz-infra;Frontend Web|https://web-mvc/healthz-infra;Shopping Cart API|https://api-cart/healthz-infra;Catalog API|https://api-catalog/healthz-infra;Customer API|https://api-customers/healthz-infra;Billing API|https://api-billing/healthz-infra;Order API|https://api-order/healthz-infra"
}

0 comments on commit e5f2a25

Please sign in to comment.