mirror of
https://github.com/lnbits/lnbits.git
synced 2025-03-17 21:31:55 +01:00
feat: explicitly export for extensions from __init__.py
(#2669)
* feat: explicitly export for extensions from `__init__.py` makes it clear what extensions are expected to use and also makes future changes to the structure of core safer because extension can just depend on ```from lnbits import require_admin_key``` for example
This commit is contained in:
parent
b83c2e9368
commit
ecc62b0011
@ -0,0 +1,24 @@
|
||||
from .core.services import create_invoice, pay_invoice
|
||||
from .decorators import (
|
||||
check_admin,
|
||||
check_super_user,
|
||||
check_user_exists,
|
||||
require_admin_key,
|
||||
require_invoice_key,
|
||||
)
|
||||
from .exceptions import InvoiceError, PaymentError
|
||||
|
||||
__all__ = [
|
||||
# decorators
|
||||
"require_admin_key",
|
||||
"require_invoice_key",
|
||||
"check_admin",
|
||||
"check_super_user",
|
||||
"check_user_exists",
|
||||
# services
|
||||
"pay_invoice",
|
||||
"create_invoice",
|
||||
# exceptions
|
||||
"PaymentError",
|
||||
"InvoiceError",
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user