Skip to content

Commit d761ecc

Browse files
committed
Add new scenarios
1 parent 2915cf6 commit d761ecc

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Controllers/WeatherForecastController.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,36 @@ public class WeatherForecastController : ControllerBase
1515
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
1616
};
1717

18+
public enum RecommendationEngineType
19+
20+
{
21+
Account401kToIRA,
22+
SDIRAInvestment,
23+
}
24+
25+
public enum RegistrationEventType
26+
{
27+
AccountCreated = 1,
28+
AccountCompleted = 2,
29+
TrustedContactAdded = 3
30+
}
31+
32+
1833
private readonly ILogger<WeatherForecastController> _logger;
1934

2035
public WeatherForecastController(ILogger<WeatherForecastController> logger)
2136
{
2237
_logger = logger;
38+
2339
}
2440

2541
[HttpGet(Name = "GetWeatherForecast")]
2642
public IEnumerable<WeatherForecast> Get()
2743
{
44+
45+
_logger.LogInformation($"HandleAsync called for trusted contact added event: {RegistrationEventType.TrustedContactAdded}");
46+
47+
2848
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
2949
{
3050
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
@@ -33,5 +53,15 @@ public IEnumerable<WeatherForecast> Get()
3353
})
3454
.ToArray();
3555
}
56+
57+
//Add post that takes in an enum value type of weather forcast
58+
[HttpPost("PostWeatherForecast/{type}/{assessmentId}")]
59+
public IActionResult Post([FromRoute] RecommendationEngineType type, [FromRoute] int assessmentId )
60+
{
61+
_logger.LogInformation("Generating {engineType} recommendation for {assessmentId}.", type, assessmentId);
62+
63+
return Ok();
64+
}
65+
3666
}
3767
}

0 commit comments

Comments
 (0)