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
|
||||
|
||||
|
||||
@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:
|
||||
|
||||
Reference in New Issue
Block a user