Created
July 9, 2021 04:53
-
-
Save kshitijcode/6a561cd0422df59dfe1bccfea4d0cc7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [HttpPost] | |
| [Route("/saveWeatherState")] | |
| public async Task<IActionResult> Post([FromBody] WeatherChange weatherChange) | |
| { | |
| try | |
| { | |
| await _daprClient.SaveStateAsync("mongo", "admin", weatherChange); | |
| } | |
| catch (Exception e) | |
| { | |
| return BadRequest(); | |
| } | |
| return Ok(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment