Skip to content

Commit

Permalink
Merge pull request #62 from NathanFallet/feature/usertag_medias
Browse files Browse the repository at this point in the history
Adding route `/media/usertag_medias`
  • Loading branch information
subzeroid authored Oct 14, 2023
2 parents 59ce65b + 2f9cb76 commit e7c3105
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 e7c3105

Please sign in to comment.