box bug
This commit is contained in:
parent
c10c3a0beb
commit
edf76708b3
@ -291,7 +291,7 @@ async def update_cookies(
|
|||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
# see if cookie file exists
|
# see if cookie file exists
|
||||||
if not os.path.exists('cookies') and os.path.exists('cookies/tcg_cookies.json'):
|
if not os.path.exists('cookies') or os.path.exists('cookies/tcg_cookies.json'):
|
||||||
logger.info("Cannot find cookies")
|
logger.info("Cannot find cookies")
|
||||||
# Create cookies directory if it doesn't exist
|
# Create cookies directory if it doesn't exist
|
||||||
os.makedirs('cookies', exist_ok=True)
|
os.makedirs('cookies', exist_ok=True)
|
||||||
|
@ -94,6 +94,7 @@ class BoxService:
|
|||||||
num_cards_expected=create_box_data.num_cards_expected
|
num_cards_expected=create_box_data.num_cards_expected
|
||||||
)
|
)
|
||||||
self.db.add(product)
|
self.db.add(product)
|
||||||
|
self.db.flush()
|
||||||
self.db.add(box)
|
self.db.add(box)
|
||||||
|
|
||||||
return box, True
|
return box, True
|
||||||
|
11
requests.md
11
requests.md
@ -5,13 +5,10 @@ curl -J -X POST \ -H "Content-Type: application/json" \
|
|||||||
http://192.168.1.41:8000/api/tcgplayer/inventory/add --remote-name
|
http://192.168.1.41:8000/api/tcgplayer/inventory/add --remote-name
|
||||||
|
|
||||||
curl -X POST http://192.168.1.41:8000/api/boxes \
|
curl -X POST http://192.168.1.41:8000/api/boxes \
|
||||||
-H "Content-Type: application/json" \
|
-F "type=draft" \
|
||||||
-d '{
|
-F "set_code=WOE" \
|
||||||
"type": "collector",
|
-F "sku=195166231631" \
|
||||||
"set_code": "MOM",
|
-F "num_cards_expected=540"
|
||||||
"sku": "ABC123",
|
|
||||||
"num_cards_expected": 15
|
|
||||||
}'
|
|
||||||
|
|
||||||
curl -X POST http://192.168.1.41:8000/api/boxes/box123/open \
|
curl -X POST http://192.168.1.41:8000/api/boxes/box123/open \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user