1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

Establish IFeatureService as scoped (#3679)

* Establish IFeatureService as scoped

* Lint

* Feedback around injection
This commit is contained in:
Matt Bishop
2024-01-18 09:47:34 -05:00
committed by GitHub
parent cd006f3779
commit 974d23efdd
26 changed files with 96 additions and 131 deletions

View File

@ -1,5 +1,4 @@
using Bit.Api.Models.Response;
using Bit.Core.Context;
using Bit.Core.Services;
using Bit.Core.Settings;
@ -11,22 +10,19 @@ namespace Bit.Api.Controllers;
public class ConfigController : Controller
{
private readonly IGlobalSettings _globalSettings;
private readonly ICurrentContext _currentContext;
private readonly IFeatureService _featureService;
public ConfigController(
IGlobalSettings globalSettings,
ICurrentContext currentContext,
IFeatureService featureService)
{
_globalSettings = globalSettings;
_currentContext = currentContext;
_featureService = featureService;
}
[HttpGet("")]
public ConfigResponseModel GetConfigs()
{
return new ConfigResponseModel(_globalSettings, _featureService.GetAll(_currentContext));
return new ConfigResponseModel(_globalSettings, _featureService.GetAll());
}
}