diff --git a/src/baby_monitor/routers/child.py b/src/baby_monitor/routers/child.py index d36aa09..fc628d3 100644 --- a/src/baby_monitor/routers/child.py +++ b/src/baby_monitor/routers/child.py @@ -63,12 +63,8 @@ def create_child( @router.get("", response_model=list[ChildResponse]) def get_user_children( user_id: Annotated[int, Depends(verify_token)], - child_repo: Annotated[ - ChildRepositoryInterface, Depends(get_child_repository) - ], - user_repo: Annotated[ - UserRepositoryInterface, Depends(get_user_repository) - ], + child_repo: Annotated[ChildRepositoryInterface, Depends(get_child_repository)], + user_repo: Annotated[UserRepositoryInterface, Depends(get_user_repository)], ) -> list[ChildResponse]: """Get all children for the authenticated user.""" children = child_repo.get_by_user_id(user_id) diff --git a/src/baby_monitor/static/diapers.html b/src/baby_monitor/static/diapers.html index 6bf330d..b02239c 100644 --- a/src/baby_monitor/static/diapers.html +++ b/src/baby_monitor/static/diapers.html @@ -321,7 +321,7 @@ if (response.ok) { allChildren = await response.json(); - + // Auto-select first child if no selection exists if (selectedChildId === null && allChildren.length > 0) { selectedChildId = allChildren[0].id; @@ -371,7 +371,9 @@ content.innerHTML = `
- ${allChildren.length === 1 ? ` + ${ + allChildren.length === 1 + ? ` - ` : ` + ` + : ` - `} + ` + } - ` : ` + ` + : ` - `} + ` + }