Skip to content

Commit

Permalink
Fix weather
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Oct 3, 2023
1 parent be62dcc commit 9e0ca30
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 33 deletions.
12 changes: 0 additions & 12 deletions Gallery.Unified.Client/Data/WeatherForecast.cs

This file was deleted.

19 changes: 0 additions & 19 deletions Gallery.Unified.Client/Data/WeatherForecastService.cs

This file was deleted.

1 change: 1 addition & 0 deletions Gallery.Unified.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// builder.Services.AddScoped<AuthenticationStateProvider>(s => s.GetRequiredService<ServiceStackStateProvider>());


var apiBaseUrl = builder.Configuration["ApiBaseUrl"] ?? builder.HostEnvironment.BaseAddress;
builder.Services.AddBlazorApiClient(apiBaseUrl);

Expand Down
27 changes: 27 additions & 0 deletions Gallery.Unified.Client/wwwroot/data/weather.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"date": "2018-05-06",
"temperatureC": 1,
"summary": "Freezing"
},
{
"date": "2018-05-07",
"temperatureC": 14,
"summary": "Bracing"
},
{
"date": "2018-05-08",
"temperatureC": -13,
"summary": "Freezing"
},
{
"date": "2018-05-09",
"temperatureC": -16,
"summary": "Balmy"
},
{
"date": "2018-05-10",
"temperatureC": -2,
"summary": "Chilly"
}
]
2 changes: 0 additions & 2 deletions Gallery.Unified/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Microsoft.AspNetCore.Mvc;
using MyApp;
using MyApp.Client;
using MyApp.Data;

var builder = WebApplication.CreateBuilder(args);

Expand All @@ -28,7 +27,6 @@

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(baseUrl) });
builder.Services.AddBlazorServerApiClient(baseUrl);
builder.Services.AddSingleton<WeatherForecastService>();
builder.Services.AddLocalStorage();
var app = builder.Build();

Expand Down

0 comments on commit 9e0ca30

Please sign in to comment.