File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Threading . Tasks ;
5+ using Microsoft . AspNetCore . Mvc ;
6+ using Staticat . ChurchMS . WebClient . Models ;
7+
8+ namespace Staticat . ChurchMS . WebClient . Controllers
9+ {
10+ [ Route ( "[Controller]" ) ]
11+ public class SettingsController : Controller
12+ {
13+ [ HttpGet ]
14+ [ ProducesResponseType ( typeof ( Settings ) , 200 ) ]
15+ public IActionResult GetSettings ( )
16+ {
17+ var settings = new Settings
18+ {
19+ Environment = Environment . GetEnvironmentVariable ( "ASPNETCORE_ENVIRONMENT" )
20+ } ;
21+
22+ return Ok ( settings ) ;
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 1+ namespace Staticat . ChurchMS . WebClient . Models
2+ {
3+ public class Settings
4+ {
5+ public string Environment { get ; set ; }
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments