Commit graph

57 commits

Author SHA1 Message Date
dni ⚡
1ffc8c3498 use new settings and remove unused amdin extension stuff 2022-10-05 13:04:36 +02:00
dni ⚡
850ed85311 fix ADMIN_UI=false errors 2022-10-05 13:01:59 +02:00
dni ⚡
e4c310d197 format 2022-10-05 13:01:59 +02:00
ben
a932f8a3d0 reverted other try 2022-10-05 13:01:59 +02:00
ben
55a4403028 Reverted try 2022-10-05 13:01:59 +02:00
ben
d8a13ed29d Added couple more tries 2022-10-05 13:01:59 +02:00
Tiago vasconcelos
5a3ad81c31 allow user settings without restart 2022-10-05 13:01:59 +02:00
calle
c5cc65a736
Fix/admin extension exception (#984)
* check if wallet exists

* check wallet existence in key check

* return FORBIDDEN for LNBITS_ADMIN_USERS
2022-09-20 15:34:03 +03:00
calle
1660b9dcf1
Revert "Revert "API key check: assert that wallet exists (#961)" (#962)" (#963)
This reverts commit 57fffa0c7f.
2022-09-12 18:49:57 +03:00
calle
57fffa0c7f
Revert "API key check: assert that wallet exists (#961)" (#962)
This reverts commit 0930fca7ec.
2022-09-12 18:41:27 +03:00
calle
0930fca7ec
API key check: assert that wallet exists (#961)
* check if wallet exists

* check wallet existence in key check
2022-09-12 18:39:53 +03:00
dni ⚡
88ec440ea1
another testcase the fails similar to #847 (#892)
* another testcase the fails similar to #847

* proper fix

* revert to statuscode 401 and code improvements @calle

Co-authored-by: dni <dni.khr@gmail.com>
2022-08-16 17:01:05 +02:00
dni ⚡
d989441587
added test for issue #847 and fixed it! (#848)
* added test for empty post data, for issue #847

* black

* fixed the failing testcase

* Update lnbits/decorators.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

Co-authored-by: dni <dni.khr@gmail.com>
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2022-08-13 14:47:29 +02:00
dni
00dba54ac8 remove FIXME add couple of ignores 2022-07-26 12:21:21 +02:00
dni
e63c4c9fa2 revert self.wallet change 2022-07-26 12:07:16 +02:00
dni
5779243d3e blacked 2022-07-25 13:30:45 +02:00
dni
a7c10dde4a fixup types 2022-07-25 13:13:50 +02:00
dni
df00a018f0 added FIXME tags and fix WalletTypeInfo 2022-07-25 12:05:16 +02:00
dni
4dfa0873e5 fix isort check 2022-07-25 12:03:06 +02:00
dni
0e393111de fix up decorators for tests 2022-07-25 12:03:06 +02:00
dni
a80fd5de7a black formating 2022-07-25 12:03:06 +02:00
dni
f677777f07 fully fix decorators, thanks calle 2022-07-25 12:03:06 +02:00
dni
56560fca02 mypy fixes for generic.py, decurators.py, eclair.py 2022-07-25 12:03:06 +02:00
calle
f4e7d62ca3
make format everything (#743) 2022-07-16 14:23:03 +02:00
callebtc
f8400512f7 black formating 2022-06-01 14:53:05 +02:00
Ben Arc
30a0d6336b removed print 2022-03-08 22:29:13 +00:00
Ben Arc
e4dd0972a5 Wrong key int being returned 2022-03-08 22:15:45 +00:00
benarc
4b11342f0c works 2022-02-07 20:43:47 +00:00
Ben Arc
dbab181759 Admin users can credit accounts 2022-01-31 16:29:42 +00:00
benarc
228717195b back 2022-01-30 19:43:30 +00:00
Tiago vasconcelos
df2345bda9 added require_invoice_key
clean up
2021-12-28 15:22:45 +00:00
Tiago vasconcelos
4739a0811d added admin key required 2021-10-18 16:06:06 +01:00
benarc
1d3bb016a2 I want them to turn black 2021-10-17 18:33:29 +01:00
Stefan Stammberger
570e8d28dd
fix: lndhub auth handling 2021-10-15 19:55:24 +02:00
Tiago vasconcelos
8e396beb44 fusion's fix (not working) 2021-10-15 17:05:38 +01:00
Tiago vasconcelos
43653cb84d auth bearer fix
x-api-key now says unauthorized
2021-10-15 16:21:05 +01:00
Stefan Stammberger
2a4314ca84
fix: raise bad req error on call without X-API-key 2021-09-28 21:13:04 +02:00
Stefan Stammberger
7b69852acc
fix: make check_user_exists() work with FastAPI 2021-09-11 15:18:09 +02:00
Stefan Stammberger
fa08177317
fix: FastAPify how data or exceptions are returned
FastAPI handles returning HTTPStatus codes differently than Quart did
2021-09-10 21:40:14 +02:00
Stefan Stammberger
fe79709698
fix: several more API calls restored 2021-08-29 19:38:42 +02:00
Stefan Stammberger
3e5af8c1d1
refactor: purge Quart from the codebase
Most functionality is still broken
2021-08-27 20:54:42 +02:00
Stefan Stammberger
938fc54af3
feat: switch from Quart to FastAPI part I 2021-08-22 20:07:24 +02:00
fiatjaf
42bd5ea989 remove exception to black line-length and reformat. 2021-03-24 00:40:32 -03:00
fiatjaf
d3fc52cd49 migrate to sqlalchemy-aio.
a big refactor that:

- fixes some issues that might have happened (or not) with asynchronous
    reactions to payments;
- paves the way to https://github.com/lnbits/lnbits/issues/121;
- uses more async/await notation which just looks nice; and
- makes it simple(r?) for one extension to modify stuff from other extensions.
2020-11-21 23:02:14 -03:00
fiatjaf
be7d36214a use payments/sse on the core wallet UI.
still fallback to the invoice polling (now with a 5 seconds interval
because less than that is too annoying).

this fixes issues with /lnurlwallet invoices not getting paid in time,
so we update the UI automatically when they do get paid.

(see https://t.me/lnbits/7069)
2020-10-15 00:18:57 -03:00
fiatjaf
f01028eac7 migrate from flask to quart.
also remove all flaskiness from static file serving.
and reference all vendored scripts on the base tempĺate for simplicity.
2020-09-14 16:03:25 -03:00
Eneko Illarramendi
1bc5e144d3 refactor: clean up __init__ file following some Flask conventions
Flask extensions are loaded in a way that makes them easily reusable by blueprints.
In this commit we are also adding `environs` to manage .env and settings:
breaking changes!

- FLASK_APP=lnbits.app
- LNBITS_ALLOWED_USERS needs to be empty now to allow all users (NOT "all")
2020-09-06 21:06:01 -03:00
Eneko Illarramendi
23cfe0d417 chore: update github workflows 2020-09-03 23:10:41 +02:00
fiatjaf
24dc6e5415 fix validation rules so description_hash works. 2020-07-04 22:28:08 -03:00
Eneko Illarramendi
8add56a24c feat: allow limiting the use of LNbits to some user uuids
The `LNBITS_ALLOWED_USERS` env var can be used to limit access
to the application to some uuids only. "all" gives open access.
UUIDs should be comma separated.
2020-05-09 22:30:33 +02:00