Add settings endpoints and registration status check: implement new API endpoints for settings management, including registration status retrieval, and update the registration command handler to enforce registration rules based on site settings.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace TeleWave.Domain.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// Простое key-value хранилище настроек сайта (единичные глобальные флаги/значения, которые админ
|
||||
/// меняет в рантайме). Ключ — стабильный строковый идентификатор; значение — строка (парсится
|
||||
/// потребителем). Отсутствие ключа трактуется как значение по умолчанию.
|
||||
/// </summary>
|
||||
public class AppSetting
|
||||
{
|
||||
public string Key { get; private set; } = string.Empty;
|
||||
public string Value { get; private set; } = string.Empty;
|
||||
|
||||
private AppSetting() { }
|
||||
|
||||
public static AppSetting Create(string key, string value) =>
|
||||
new() { Key = key, Value = value };
|
||||
|
||||
public void SetValue(string value) => Value = value;
|
||||
}
|
||||
Reference in New Issue
Block a user