lnbits-legend/lnbits
dni ⚡ bda054415a
[FEAT] improve update_admin_settings (#1903)
* [FEAT] improve update_admin_settings

while working on the push notification pr i found it very hard just to update
2 settings inside the db, so i improved upon update_admin_settings.
now you just need to provide a dict with key/values you want to update inside db.

also debugging the endpoints for update_settings i found despite the type of `EditableSettings`
fastapi did in fact pass a dict.

* t

* use `EditableSettings` as param in update_settings

* fix settings model validation

we previously overrode the pydantic validation with our own method

* make `LnbitsSettings` a `BaseModel` and only add `BaseSettings` later

this allows us to instantiate `EditableSettings` without the environment values being loaded in

* add test

* forbid extra fields in update api

* fixup

* add test

* test datadir

* move UpdateSettings

* fix compat

* fixup webpush

---------

Co-authored-by: jacksn <jkranawetter05@gmail.com>
2023-09-12 10:59:32 +01:00
..
core [FEAT] improve update_admin_settings (#1903) 2023-09-12 10:59:32 +01:00
static [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
templates [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
utils [CHORE] cleanup cache and exception on make test (#1899) 2023-08-28 10:56:59 +01:00
wallets [REFACTOR] grpcio and protofbuf for lndgrpc is not optional (#1886) 2023-09-11 14:24:37 +01:00
__init__.py
__main__.py
app.py [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
bolt11.py [DEV] add ruff for linting and combine linters into one workflow (#1875) 2023-08-19 07:38:04 +02:00
commands.py [REFACTOR] .super_user move it into data dir (#1900) 2023-09-11 12:19:19 +01:00
db.py [FEAT] create data folder if it doesnt exist (#1930) 2023-09-12 11:56:21 +02:00
decorators.py Add deleted flag wallet (#1826) 2023-09-11 14:06:31 +01:00
extension_manager.py [CHORE] string formatting default length 88 (#1887) 2023-08-24 10:26:09 +01:00
helpers.py [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
jinja2_templating.py fix pyright lnbits 2023-04-04 07:34:17 +02:00
lnurl.py fix pylint W0612 (unused-variable) 2023-01-30 11:46:43 +00:00
middleware.py [CHORE] string formatting default length 88 (#1887) 2023-08-24 10:26:09 +01:00
requestvars.py
server.py [REFACTOR] replace async_wrap with run_sync (#1858) 2023-08-28 10:59:56 +01:00
settings.py [FEAT] improve update_admin_settings (#1903) 2023-09-12 10:59:32 +01:00
tasks.py [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00