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
commit7d08ce0d0625b8e6a4c6328d9c9d339cc52db4c2 (patch)
tree328e729bbbc08bcf8a16fc494cb1c6625e35d2a6 /Timeline/Controllers/TodoListController.cs
parent94d9233375f3c8bedcf4dbc62e59f20969af7cb9 (diff)
parent1ff6afb0e9fd11ce37ed0206b992514041391761 (diff)
downloadtimeline-7d08ce0d0625b8e6a4c6328d9c9d339cc52db4c2.tar.gz
timeline-7d08ce0d0625b8e6a4c6328d9c9d339cc52db4c2.tar.bz2
timeline-7d08ce0d0625b8e6a4c6328d9c9d339cc52db4c2.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);
+ }
+ }
+}