mirror of
https://github.com/bitwarden/server.git
synced 2025-05-04 11:12:20 -05:00
29 lines
687 B
C#
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());
|
|
}
|
|
}
|