diff --git a/lnbits/core/crud.py b/lnbits/core/crud.py
index 2c0c5c3d5..2c91bc22a 100644
--- a/lnbits/core/crud.py
+++ b/lnbits/core/crud.py
@@ -286,7 +286,11 @@ async def create_payment(
async def update_payment_status(checking_id: str, pending: bool) -> None:
await db.execute(
- "UPDATE apipayments SET pending = ? WHERE checking_id = ?", (int(pending), checking_id,),
+ "UPDATE apipayments SET pending = ? WHERE checking_id = ?",
+ (
+ int(pending),
+ checking_id,
+ ),
)
diff --git a/lnbits/extensions/offlineshop/crud.py b/lnbits/extensions/offlineshop/crud.py
index 2d9376dd0..5da350a5e 100644
--- a/lnbits/extensions/offlineshop/crud.py
+++ b/lnbits/extensions/offlineshop/crud.py
@@ -34,12 +34,20 @@ async def get_or_create_shop_by_wallet(wallet: str) -> Optional[Shop]:
async def set_wordlist(shop: int, wordlist: str) -> Optional[Shop]:
await db.execute(
- "UPDATE shops SET wordlist = ? WHERE id = ?", (wordlist, shop),
+ "UPDATE shops SET wordlist = ? WHERE id = ?",
+ (wordlist, shop),
)
return await get_shop(shop)
-async def add_item(shop: int, name: str, description: str, image: Optional[str], price: int, unit: str,) -> int:
+async def add_item(
+ shop: int,
+ name: str,
+ description: str,
+ image: Optional[str],
+ price: int,
+ unit: str,
+) -> int:
result = await db.execute(
"""
INSERT INTO items (shop, name, description, image, price, unit)
@@ -51,7 +59,13 @@ async def add_item(shop: int, name: str, description: str, image: Optional[str],
async def update_item(
- shop: int, item_id: int, name: str, description: str, image: Optional[str], price: int, unit: str,
+ shop: int,
+ item_id: int,
+ name: str,
+ description: str,
+ image: Optional[str],
+ price: int,
+ unit: str,
) -> int:
await db.execute(
"""
diff --git a/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html b/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html
index f0d4a151a..1e3bf0519 100644
--- a/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html
+++ b/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html
@@ -8,20 +8,35 @@
- The confirmation codes are words from a predefined sequential word list. Each new payment bumps the words sequence by 1. So you can check the confirmation codes manually by just looking at them.
+ The confirmation codes are words from a predefined sequential word list.
+ Each new payment bumps the words sequence by 1. So you can check the
+ confirmation codes manually by just looking at them.
- For example, if your wordlist is
- Powered by LNURL-pay.
+ For example, if your wordlist is
+ Powered by LNURL-pay.
[apple, banana, coconut]
the first purchase will be apple
, the second banana
and so on. When it gets to the end it starts from the beginning again.
- [apple, banana, coconut]
the first purchase will be
+ apple
, the second banana
and so on. When it
+ gets to the end it starts from the beginning again.
{"id": <integer>, "wallet": <string>, "wordlist":
- <string>, "items": [{"id": <integer>, "name": <string>, "description": <string>, "image": <string>, "enabled": <boolean>, "price": <integer>, "unit": <string>, "lnurl": <string>}, ...]}</code
+ <string>, "items": [{"id": <integer>, "name":
+ <string>, "description": <string>, "image":
+ <string>, "enabled": <boolean>, "price": <integer>,
+ "unit": <string>, "lnurl": <string>}, ...]}<