aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/TodoListController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline/Controllers/TodoListController.cs')
-rw-r--r--Timeline/Controllers/TodoListController.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/Timeline/Controllers/TodoListController.cs b/Timeline/Controllers/TodoListController.cs
new file mode 100644
index 00000000..b773ed2e
--- /dev/null
+++ b/Timeline/Controllers/TodoListController.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
+using Timeline.Configs;
+
+namespace Timeline.Controllers
+{
+ [Route("api/[controller]")]
+ public class TodoListController : Controller
+ {
+ private readonly IOptionsMonitor<TodoListConfig> _config;
+
+ public TodoListController(IOptionsMonitor<TodoListConfig> config)
+ {
+ _config = config;
+ }
+
+ [HttpGet("[action]")]
+ [AllowAnonymous]
+ [Produces("text/plain")]
+ public ActionResult<string> AzureDevOpsPat()
+ {
+ return Ok(_config.CurrentValue.AzureDevOpsPat);
+ }
+ }
+}