|
|
|
|
@ -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(
|
|
|
|
|
|