* test: remove warnings for `TemplateResponse`
removes warnings
```
tests/core/views/test_generic.py::test_core_views_generic
tests/core/views/test_generic.py::test_get_wallet_with_user_and_wallet
tests/core/views/test_generic.py::test_get_extensions
tests/core/views/test_public_api.py::test_core_views_generic
/home/dni/.cache/pypoetry/virtualenvs/lnbits-XeqO4Z-j-py3.10/lib/python3.10/site-packages/starlette/templating.py:178: DeprecationWarning: The `name` is not the first para
meter anymore. The first parameter should be the `Request` instance.
Replace `TemplateResponse(name, {"request": request})` by `TemplateResponse(request, name)`.
warnings.warn(
```
this logically groups api endpoints and gioves them specific openapi tags. which makes them nice on the `/docs` endpoint and makes the `api.py` more approachable
* add wallets list endpoint
* remove trailing slashes from endpoints
* fixup topup url
* fix trailing slash on auth
* backwards compatibility
- add to admin ui
- move to `ExtensionsSettings`
- hide left navbar when disabled
- do not register extension routes on startup
- do not check for installed extensions on startup
- reafctor into register_all_ext_routes
* feat: reduce initial request on wallet page
- refactor allowed_currencies into function to use in generic and api.
- remove currencies request in frontend move it to generic
- dont request balance on first payments fetch
* refactor: move registering of tasks into `app.py`
let the app have the responsibility to create the tasks not a helper function inside tasks.py.
makes it way easier to follow on how those background tasks are ran.
* Remove raw from templates
* Remove v-text from q-tooltip
* extension buttons
* Move more to spans
* Reformatted
---------
Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
* fix: webhook sent raise a failed request
is not raised even failed webhook would be marked is sent
* add warn log
* fix error
* improve exceptions
* fixup!
* ConnectError is already captured by RequestError
https://www.python-httpx.org/exceptions/
* log exception
* feat: add helper methods
* fix: do not try to stop background work on first install
* fix: first stop via function call then try REST API
* fix: `make check`
* fix: prepare for `{ext_id}_stop`
* feat: add node url to api keys & docs
closes#2277
* add finnish to tools/i18n-ai-tool.py
* regenerate localization with i18n-ai-tool
* chore: make bundle
---------
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* refactor: add `prepareFilterQuery` to utils
factored out the preparation of the url params for a paginated table and its requests.
usermanager will also use that.
move authentication into security in preparation of user manager pr where users tab will be removed.
move service fee into server tab, i think its more fitting there.
* feat: `cleanup-wallet` cli command
`lnbits-cli db cleanup-wallets` removes all wallets that never had an transaction.
this helps against spammers creating random wallets, eventually slowing down the db.
* add commands
* add to example env
* db_versions was used in app
* add delta as cli argument
* use days unit
* simplify cli argument name (cleanup_wallet_days -> days)!
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* Login form loading
* add first install middleware and settings
* updates
* Login form loading
* add first install middleware and settings
* updates
* only set first install when superuser is created
* refactor first install
* only show if first install
* cleanup
* set password
* update calls
* login superuser on first install
* fix
* fixup!
* fixup!
* fixup!
* fixup!
* fixup!
* last fixup!
* fix mypy and prettier CI errors
* disable first install
* add random super user
* set first install after startup
* remove user id from form
* Update lnbits/core/views/auth_api.py
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* Update lnbits/core/views/auth_api.py
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* Update lnbits/middleware.py
Co-authored-by: dni ⚡ <office@dnilabs.com>
* addressing Vlad's comments
* remove super user
* move to transient settings
* fix: show `first_install` page even after a server restart
* fix: do not add `user_id` in the auth token
* fix: `make check` errors
* fix: `username` is not optional for `UpdateSuperuserPassword`
* feat: nicer error message
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>
Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* feat: allow all extension deactivation
* doc: updated comment
* fix: make sure `register_routes` executes after installed extensions are checked
* chore: code format
* fix: do not run migration on deactivated extensions
* fix: make sure the deactivated extension list is loaded in time
* feat: register extension routes if extension never loaded before
* fix: move `load_disabled_extension_list`
* doc: disable by default