db dates
This commit is contained in:
@@ -34,7 +34,7 @@ async def protected(current_user: str = Depends(JWT.current_user)):
|
||||
@api.get("/", response_model=list[pydentic.UserOut]) #список!
|
||||
async def get_all_rows(current_user: str = Depends(JWT.current_user)):
|
||||
users = await db.get_all_rows()
|
||||
if not user:
|
||||
if not users:
|
||||
raise HTTPException(status_code=401, detail="The user isn't found")
|
||||
return users
|
||||
@api.get("/get_user_by_email/{email}", response_model=pydentic.UserOut)
|
||||
|
||||
Reference in New Issue
Block a user