Check pt before trip to NC 2024-01-18
This commit is contained in:
1 parent
5882332129
commit
8bcae22020
4 files changed
+115
-15
No files matched your search
+5
-11
@@ -3,8 +3,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class DataStreamSubscriptionController : ControllerBase
|
||||
{
|
||||
public class DataStreamSubscriptionController : ControllerBase {
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
@@ -12,19 +11,14 @@ public class DataStreamSubscriptionController : ControllerBase
|
||||
|
||||
private readonly ILogger<DataStreamSubscriptionController> _logger;
|
||||
|
||||
public DataStreamSubscriptionController(ILogger<DataStreamSubscriptionController> logger)
|
||||
{
|
||||
public DataStreamSubscriptionController(ILogger<DataStreamSubscriptionController> logger) {
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet(Name = "GetDataStreamSubscription")]
|
||||
public IEnumerable<DataStreamSubscription> Get()
|
||||
{
|
||||
return Enumerable.Range(1, 5).Select(index => new DataStreamSubscription
|
||||
{
|
||||
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
||||
public IEnumerable<DataStreamSubscription> Get() {
|
||||
return Enumerable.Range(1, 5).Select(index => new DataStreamSubscription {
|
||||
Query = "fake queronious"
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user