lnbits-legend/lnbits/core
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
..
static [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
templates track fiat value of payments (#1789) 2023-08-28 11:00:59 +01:00
views [FEAT] improve update_admin_settings (#1903) 2023-09-12 10:59:32 +01:00
__init__.py improve on openapi metadata (#1795) 2023-08-24 10:52:12 +01:00
crud.py [FEAT] improve update_admin_settings (#1903) 2023-09-12 10:59:32 +01:00
helpers.py [CHORE] string formatting default length 88 (#1887) 2023-08-24 10:26:09 +01:00
migrations.py [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
models.py [FEAT] Push notification integration into core (#1393) 2023-09-11 14:48:49 +01:00
services.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