This commit is contained in:
Timothy Jaeryang Baek committed 2024-11-15 03:02:08 -08:00
1 parent a0f1164af7
commit 147bd0717d
2 files changed
+10 -5

No files matched your search

@@ -116,7 +116,7 @@ async def delete_model_by_id(id: str, user=Depends(get_verified_user)):
detail=ERROR_MESSAGES.NOT_FOUND,
)
if model.user_id != user.id:
if model.user_id != user.id and user.role != "admin":
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail=ERROR_MESSAGES.UNAUTHORIZED,