feat: add address for order
This commit is contained in:
parent
1b317b1b9b
commit
da41ed3651
3 changed files with 6 additions and 4 deletions
5
crud.py
5
crud.py
|
|
@ -318,14 +318,15 @@ async def delete_product(user_id: str, product_id: str) -> None:
|
|||
async def create_order(user_id: str, o: Order) -> Order:
|
||||
await db.execute(
|
||||
f"""
|
||||
INSERT INTO nostrmarket.orders (user_id, id, event_id, pubkey, contact_data, order_items, invoice_id, total)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
INSERT INTO nostrmarket.orders (user_id, id, event_id, pubkey, address, contact_data, order_items, invoice_id, total)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
""",
|
||||
(
|
||||
user_id,
|
||||
o.id,
|
||||
o.event_id,
|
||||
o.pubkey,
|
||||
o.address,
|
||||
json.dumps(o.contact.dict() if o.contact else {}),
|
||||
json.dumps([i.dict() for i in o.items]),
|
||||
o.invoice_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue