Changes to lookup method and added lookup barcode.

This commit is contained in:
dan
2021-06-12 14:17:58 -04:00
parent 93dee9a4cd
commit dd2948bc56

View File

@@ -82,11 +82,11 @@ async def getbooks(userid):
return books
@app.post('/lookup')
@app.post('/lookup/')
async def lookup(isbn: str = Form(...)):
info = await getMeta(isbn)
return {"Title": info['Title']}
# return {"Title": info['Title']}
return {"Book": info}
@app.post('/AddLocation/')
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')
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()
try: