Created
October 31, 2018 03:13
-
-
Save akki-s/d7d0f87869276b3c8463b0f9e89efc56 to your computer and use it in GitHub Desktop.
This file contains 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
[FunctionName("GetTimeZones")] | |
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "timezones")]HttpRequest req, ILogger log) | |
{ | |
var serviceProvider = Bootstrap.ConfigureServices(); | |
log.LogInformation("GET TIMEZONES"); | |
var timeZoneService = ServiceProvider.GetService<ITimeZoneService>(); | |
var timeZones = await timeZoneService.GetTimeZones().ConfigureAwait(false); | |
return new OkObjectResult(timeZones ?? new List<string>()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment