You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
585 B

from fastapi import FastAPI
app = FastAPI()
@app.get("/new_session")
async def new_session():
# add session to the database
# return new session cookie
return {"session_id": 42}
@app.get("/next_picture/{session_id}")
async def next_picture(session_id: int):
# take not rated picture from the database
# do not insert anything in the database yet
# return this picture
pass
@app.get("/rate_picture/{session_id}/{picture_id}/{mark}")
async def rate_picture(session_id: int, picture_id: int, mark: int):
# add new mark to the session table
pass