aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/TodoListController.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-02-18 12:14:17 +0000
committer杨宇千 <crupest@outlook.com>2019-02-18 12:14:17 +0000
commitddf2848df70c40f443773cd1b76d9db13cd1fa23 (patch)
tree8e1e2ac2dd6df278f59a97a37e5d374bc2644843 /Timeline/Controllers/TodoListController.cs
parent122a28595e45c6ec48a773ca1284238566d497d3 (diff)
parent1f0a978ad2b8e5bcd57eef37baca93e00fd6b20b (diff)
downloadtimeline-ddf2848df70c40f443773cd1b76d9db13cd1fa23.tar.gz
timeline-ddf2848df70c40f443773cd1b76d9db13cd1fa23.tar.bz2
timeline-ddf2848df70c40f443773cd1b76d9db13cd1fa23.zip
Merged PR 1: Develop todo list page.
Related work items: #1
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);
+ }
+ }
+}