missing LNBITS_ADMIN_EXTENSIONS and fix update bug
This commit is contained in:
parent
c0fc53028b
commit
35536dde9b
|
@ -58,9 +58,6 @@ async def update_admin_settings(data: UpdateSettings):
|
|||
def get_q_and_values(data):
|
||||
keys = []
|
||||
values = []
|
||||
# exclude from api updates
|
||||
data.pop("lnbits_allowed_funding_sources")
|
||||
data.pop("super_user")
|
||||
for key, value in data.items():
|
||||
setattr(settings, key, value)
|
||||
keys.append(f"{key} = ?")
|
||||
|
|
|
@ -3,6 +3,7 @@ async def m001_create_admin_settings_table(db):
|
|||
"""
|
||||
CREATE TABLE IF NOT EXISTS admin.settings (
|
||||
super_user TEXT,
|
||||
lnbits_admin_extensions TEXT,
|
||||
lnbits_admin_users TEXT,
|
||||
lnbits_allowed_users TEXT,
|
||||
lnbits_disabled_extensions TEXT,
|
||||
|
|
|
@ -10,6 +10,7 @@ class UpdateSettings(BaseModel, extra=Extra.forbid):
|
|||
"lnbits_allowed_users",
|
||||
"lnbits_theme_options",
|
||||
"lnbits_disabled_extensions",
|
||||
"lnbits_admin_extensions",
|
||||
pre=True,
|
||||
)
|
||||
def validate(cls, val):
|
||||
|
@ -20,6 +21,7 @@ class UpdateSettings(BaseModel, extra=Extra.forbid):
|
|||
lnbits_backend_wallet_class: str = Query(None)
|
||||
lnbits_admin_users: List[str] = Query(None)
|
||||
lnbits_allowed_users: List[str] = Query(None)
|
||||
lnbits_admin_extensions: List[str] = Query(None)
|
||||
lnbits_disabled_extensions: List[str] = Query(None)
|
||||
lnbits_theme_options: List[str] = Query(None)
|
||||
lnbits_force_https: bool = Query(None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user