Fixed scopes

This commit is contained in:
Profitroll 2023-02-14 14:32:03 +01:00
parent ddca4a4a3d
commit 2a100db981

View File

@ -81,7 +81,7 @@ async def video_upload(file: UploadFile, album: str, caption: Union[str, None] =
)
@app.get("/videos/{id}", description="Get a video by id")
async def video_get(id: str, current_user: User = Security(get_current_active_user, scopes=["videos.view"])):
async def video_get(id: str, current_user: User = Security(get_current_active_user, scopes=["videos.read"])):
try:
video = col_videos.find_one( {"_id": ObjectId(id)} )