fix: cookies are str now

main
rrr-marble 5 years ago
parent 20278eeee7
commit 3001b78921

@ -42,7 +42,7 @@ async def new_session():
@app.get("/next_picture/{cookie}")
async def next_picture(cookie: int):
async def next_picture(cookie: str):
"""Request new picture to rate."""
# check if the cookie is valid
cur.execute(
@ -90,8 +90,8 @@ async def next_picture(cookie: int):
} # Q: do we return something specific, or just use a convention here?
@app.get("/rate_picture/{session_id}/{picture_id}/{mark}")
async def rate_picture(session_id: int, picture_id: int, mark: int):
@app.get("/rate_picture/{cookie}/{picture_id}/{mark}")
async def rate_picture(cookie: str, picture_id: int, mark: int):
"""Submit a rating for the picture"""
# check if the cookie is valid
cur.execute(

Loading…
Cancel
Save