refactor: use JSON for settings

This commit is contained in:
Vlad Stan
2022-12-09 13:14:22 +02:00
parent 0ed2ec6519
commit d6d42250a9
3 changed files with 16 additions and 100 deletions
+1 -58
View File
@@ -195,64 +195,7 @@ async def m006_create_admin_settings_table(db):
"""
CREATE TABLE IF NOT EXISTS settings (
super_user TEXT,
lnbits_admin_extensions TEXT,
lnbits_admin_users TEXT,
lnbits_allowed_users TEXT,
lnbits_disabled_extensions TEXT,
lnbits_site_title TEXT,
lnbits_site_tagline TEXT,
lnbits_site_description TEXT,
lnbits_default_wallet_name TEXT,
lnbits_theme_options TEXT,
lnbits_custom_logo TEXT,
lnbits_ad_space TEXT,
lnbits_ad_space_title TEXT,
lnbits_ad_space_enabled BOOLEAN,
lnbits_force_https TEXT,
lnbits_reserve_fee_min TEXT,
lnbits_reserve_fee_percent TEXT,
lnbits_service_fee TEXT,
lnbits_hide_api TEXT,
lnbits_denomination TEXT,
lnbits_backend_wallet_class TEXT,
lnbits_endpoint TEXT,
lnbits_key TEXT,
fake_wallet_secret TEXT,
cliche_endpoint TEXT,
corelightning_rpc TEXT,
eclair_url TEXT,
eclair_pass TEXT,
lnd_cert TEXT,
lnd_admin_macaroon TEXT,
lnd_invoice_macaroon TEXT,
lnd_rest_endpoint TEXT,
lnd_rest_cert TEXT,
lnd_rest_macaroon TEXT,
lnd_rest_macaroon_encrypted TEXT,
lnd_grpc_endpoint TEXT,
lnd_grpc_cert TEXT,
lnd_grpc_port INTEGER,
lnd_grpc_admin_macaroon TEXT,
lnd_grpc_invoice_macaroon TEXT,
lnd_grpc_macaroon TEXT,
lnd_grpc_macaroon_encrypted TEXT,
lnpay_api_endpoint TEXT,
lnpay_api_key TEXT,
lnpay_wallet_key TEXT,
lntxbot_api_endpoint TEXT,
lntxbot_key TEXT,
opennode_api_endpoint TEXT,
opennode_key TEXT,
spark_url TEXT,
spark_token TEXT,
boltz_network TEXT,
boltz_url TEXT,
boltz_mempool_space_url TEXT,
boltz_mempool_space_url_ws TEXT,
lntips_api_endpoint TEXT,
lntips_api_key TEXT,
lntips_admin_key TEXT,
lntips_invoice_key TEXT
editable_settings TEXT NOT NULL DEFAULT '{}'
);
"""
)