ASPNetCore/TestAppRuna/API/SettingsController.cs
2021-03-24 16:51:02 +07:00

28 lines
609 B
C#

using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TestAppRuna.Services;
namespace TestAppRuna.API
{
[Route("api/[controller]")]
[ApiController]
public class SettingsController : ControllerBase
{
public SettingsController(AppSettings appSettings)
{
Settings = appSettings;
}
public AppSettings Settings { get; }
[HttpGet]
public string Get()
{
return Settings.CompanyName;
}
}
}