Fixed isbn lookup provider
This commit is contained in:
5
main.py
5
main.py
@@ -8,15 +8,18 @@ app = FastAPI()
|
|||||||
async def root():
|
async def root():
|
||||||
return {"message": "Hello World"}
|
return {"message": "Hello World"}
|
||||||
|
|
||||||
|
|
||||||
@app.post('/checkin/{isbn}')
|
@app.post('/checkin/{isbn}')
|
||||||
async def checkin(isbn):
|
async def checkin(isbn):
|
||||||
return{"Checked in": isbn}
|
return{"Checked in": isbn}
|
||||||
|
|
||||||
|
|
||||||
@app.get('/checkout/{isbn}')
|
@app.get('/checkout/{isbn}')
|
||||||
async def checkout(isbn):
|
async def checkout(isbn):
|
||||||
return{"Checked Out": isbn}
|
return{"Checked Out": isbn}
|
||||||
|
|
||||||
|
|
||||||
@app.put('/lookup/{isbn}')
|
@app.put('/lookup/{isbn}')
|
||||||
async def lookup(isbn):
|
async def lookup(isbn):
|
||||||
info = meta(isbn, service='Default')
|
info = meta(str(isbn), service='wiki')
|
||||||
return{"Title": info['Title']}
|
return{"Title": info['Title']}
|
||||||
|
|||||||
Reference in New Issue
Block a user