Шифрование, GIF, хранилище, админка
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Knot.Shared.Kernel.Configuration;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Host.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class ConfigController : ControllerBase
|
||||
{
|
||||
private readonly ISettingsService _settings;
|
||||
|
||||
public ConfigController(ISettingsService settings)
|
||||
{
|
||||
_settings = settings;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult GetPublicConfig()
|
||||
{
|
||||
var conf = _settings.Current;
|
||||
return Ok(new
|
||||
{
|
||||
conf.EnableCalls,
|
||||
conf.EnableKlipy,
|
||||
KlipyApiKey = conf.EnableKlipy ? conf.KlipyApiKey : null,
|
||||
KlipyCustomerId = conf.EnableKlipy ? conf.KlipyCustomerId : null,
|
||||
conf.MaxFileSizeMb,
|
||||
conf.MaxGroupMembers,
|
||||
conf.EnableConfederation
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user