From c5b205db040ddca668ea3552baaeae1c86eb6e6a Mon Sep 17 00:00:00 2001 From: littlefoot Date: Wed, 13 Oct 2021 11:35:54 -0400 Subject: [PATCH] Changes --- .../Controllers/WeatherForecastController.cs | 39 ------------------- WebAPI/Data/Models/User.cs | 2 +- WebAPI/WeatherForecast.cs | 15 ------- WebAPI/WebAPI.csproj | 4 ++ 4 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 WebAPI/Controllers/WeatherForecastController.cs delete mode 100644 WebAPI/WeatherForecast.cs diff --git a/WebAPI/Controllers/WeatherForecastController.cs b/WebAPI/Controllers/WeatherForecastController.cs deleted file mode 100644 index df87171..0000000 --- a/WebAPI/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; - -namespace WebAPI.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} \ No newline at end of file diff --git a/WebAPI/Data/Models/User.cs b/WebAPI/Data/Models/User.cs index e069de3..171348a 100644 --- a/WebAPI/Data/Models/User.cs +++ b/WebAPI/Data/Models/User.cs @@ -2,6 +2,6 @@ namespace WebAPI.Data.Models { public class User : BaseEntity { - public int PterodactylUserId { get; set; } + public int? PterodactylUserId { get; set; } } } \ No newline at end of file diff --git a/WebAPI/WeatherForecast.cs b/WebAPI/WeatherForecast.cs deleted file mode 100644 index 0b7941d..0000000 --- a/WebAPI/WeatherForecast.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace WebAPI -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int) (TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 40ce389..aa209f5 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -16,4 +16,8 @@ + + + +