From 9108e15555fc9e405b60ac210f3bb7b471187c5f Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Wed, 23 Oct 2024 23:07:28 +0200 Subject: [PATCH] fix endpoint search --- app/routers/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routers/events.py b/app/routers/events.py index cd850d4..be93b40 100644 --- a/app/routers/events.py +++ b/app/routers/events.py @@ -42,7 +42,7 @@ async def read_events(authorize: Annotated[bool, Depends(permissions_checker.Per @router.get("/events/search", tags=["events"], response_model=list[events.EventOut]) -async def search_events(authorize: Annotated[bool, Depends(permissions_checker.PermissionChecker(roles=["Admin", "User"]))], skip: int = 0, limit: int = 20, item: str | None = None, status: int | None = None): +async def search_events(authorize: Annotated[bool, Depends(permissions_checker.PermissionChecker(roles=["Admin", "User"]))], skip: int = 0, limit: int = 20, item: str | None = None, status: int = 1): if limit < 1 or skip < 0 or limit < skip: raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST,