Changes to lookup method and added lookup barcode.
This commit is contained in:
8
main.py
8
main.py
@@ -82,11 +82,11 @@ async def getbooks(userid):
|
|||||||
return books
|
return books
|
||||||
|
|
||||||
|
|
||||||
@app.post('/lookup')
|
@app.post('/lookup/')
|
||||||
async def lookup(isbn: str = Form(...)):
|
async def lookup(isbn: str = Form(...)):
|
||||||
info = await getMeta(isbn)
|
info = await getMeta(isbn)
|
||||||
return {"Title": info['Title']}
|
# return {"Title": info['Title']}
|
||||||
|
return {"Book": info}
|
||||||
|
|
||||||
@app.post('/AddLocation/')
|
@app.post('/AddLocation/')
|
||||||
async def checkin(BookCase: str = Form(...), Shelf: str = Form(...)):
|
async def checkin(BookCase: str = Form(...), Shelf: str = Form(...)):
|
||||||
@@ -100,7 +100,7 @@ async def checkin(BookCase: str = Form(...), Shelf: str = Form(...)):
|
|||||||
|
|
||||||
@app.post('/barcodes')
|
@app.post('/barcodes')
|
||||||
async def barcodes(userid: int = Form(...)):
|
async def barcodes(userid: int = Form(...)):
|
||||||
barcode = {'Check In': 'CI', 'Check Out': 'CO'}
|
barcode = {'Check In': 'CI', 'Check Out': 'CO', 'Lookup': 'LU', 'Update': 'UPDATE'}
|
||||||
pdf = FPDF()
|
pdf = FPDF()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user