add visible field to form
This commit is contained in:
@@ -13,10 +13,20 @@ async def get_forms(
|
||||
seasons: list[str] = Query([]),
|
||||
productors: list[str] = Query([]),
|
||||
current_season: bool = False,
|
||||
session: Session = Depends(get_session)
|
||||
session: Session = Depends(get_session),
|
||||
):
|
||||
return service.get_all(session, seasons, productors, current_season)
|
||||
|
||||
@router.get('/referents', response_model=list[models.FormPublic])
|
||||
async def get_forms_filtered(
|
||||
seasons: list[str] = Query([]),
|
||||
productors: list[str] = Query([]),
|
||||
current_season: bool = False,
|
||||
session: Session = Depends(get_session),
|
||||
user: models.User = Depends(get_current_user)
|
||||
):
|
||||
return service.get_all(session, seasons, productors, current_season, user)
|
||||
|
||||
@router.get('/{id}', response_model=models.FormPublic)
|
||||
async def get_form(id: int, session: Session = Depends(get_session)):
|
||||
result = service.get_one(session, id)
|
||||
|
||||
Reference in New Issue
Block a user