1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-04 11:12:20 -05:00
bitwarden/src/Api/Controllers/ConfigController.cs
Matt Bishop 974d23efdd
Establish IFeatureService as scoped (#3679)
* Establish IFeatureService as scoped

* Lint

* Feedback around injection
2024-01-18 09:47:34 -05:00

29 lines
687 B
C#

using Bit.Api.Models.Response;
using Bit.Core.Services;
using Bit.Core.Settings;
using Microsoft.AspNetCore.Mvc;
namespace Bit.Api.Controllers;
[Route("config")]
public class ConfigController : Controller
{
private readonly IGlobalSettings _globalSettings;
private readonly IFeatureService _featureService;
public ConfigController(
IGlobalSettings globalSettings,
IFeatureService featureService)
{
_globalSettings = globalSettings;
_featureService = featureService;
}
[HttpGet("")]
public ConfigResponseModel GetConfigs()
{
return new ConfigResponseModel(_globalSettings, _featureService.GetAll());
}
}