This commit is contained in:
Dev Nev
2024-09-03 19:37:42 +05:30
committed by GitHub
parent c67ef31915
commit 5555113176

View File

@@ -373,7 +373,7 @@ async def parse_jwt_data(
async def valid_owned_post( async def valid_owned_post(
post: dict[str, Any] = Depends(valid_post_id), post: dict[str, Any] = Depends(valid_post_id),
token_data: ddict[str, Any] = Depends(parse_jwt_data), token_data: dict[str, Any] = Depends(parse_jwt_data),
) -> dict[str, Any]: ) -> dict[str, Any]:
if post["creator_id"] != token_data["user_id"]: if post["creator_id"] != token_data["user_id"]:
raise UserNotOwner() raise UserNotOwner()