Skip to content

Commit

Permalink
Adding route /media/usertag_medias
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfallet committed Oct 14, 2023
1 parent 59ce65b commit 2f9cb76
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions routers/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ async def user_medias(sessionid: str = Form(...),
return cl.user_medias(user_id, amount)


@router.post("/usertag_medias", response_model=List[Media])
async def usertag_medias(sessionid: str = Form(...),
user_id: int = Form(...),
amount: Optional[int] = Form(50),
clients: ClientStorage = Depends(get_clients)) -> List[Media]:
"""Get medias where a user is tagged
"""
cl = clients.get(sessionid)
return cl.usertag_medias(user_id, amount)


@router.post("/delete", response_model=bool)
async def media_delete(sessionid: str = Form(...),
media_id: str = Form(...),
Expand Down

0 comments on commit 2f9cb76

Please sign in to comment.