Skip to content

Commit 92d2df3

Browse files
authored
Merge branch 'main' into staging-threads-to-main
2 parents 057d261 + ad71550 commit 92d2df3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/app/api/routes/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Any, List
22

3-
from fastapi import APIRouter, Depends, HTTPException
3+
from fastapi import APIRouter, Depends, HTTPException, Query
44
from sqlalchemy import func
55
from sqlmodel import Session, select
66

@@ -18,7 +18,7 @@
1818

1919
# Retrieve projects
2020
@router.get("/",dependencies=[Depends(get_current_active_superuser)], response_model=APIResponse[List[ProjectPublic]])
21-
def read_projects(session: SessionDep, skip: int = 0, limit: int = 100):
21+
def read_projects(session: SessionDep, skip: int = Query(0, ge=0), limit: int = Query(100, ge=1, le=100)):
2222
count_statement = select(func.count()).select_from(Project)
2323
count = session.exec(count_statement).one()
2424

0 commit comments

Comments
 (0)