Enhance authentication input fields with autocomplete attributes and refactor API registration and login methods for improved response handling
This commit is contained in:
@@ -180,11 +180,14 @@ async def progression(
|
||||
kind: Annotated[str, Query(pattern="^(exercise|equipment)$")] = "exercise",
|
||||
entity_id: str | None = None,
|
||||
) -> Any:
|
||||
p: dict[str, Any] = {"kind": kind}
|
||||
if entity_id is not None:
|
||||
p["entity_id"] = entity_id
|
||||
return await logic_request(
|
||||
"GET",
|
||||
"/internal/analytics/progression",
|
||||
user,
|
||||
params={"kind": kind, "entity_id": entity_id},
|
||||
params=p,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -351,8 +351,8 @@ def recalculate_workout_calories(db: Session, workout_id: uuid.UUID) -> None:
|
||||
def get_progression(
|
||||
db: Db,
|
||||
user_id: CurrentUserId,
|
||||
kind: str = Query(pattern="^(exercise|equipment)$"),
|
||||
entity_id: uuid.UUID | None = None,
|
||||
kind: Annotated[str, Query(pattern="^(exercise|equipment)$")],
|
||||
entity_id: Annotated[uuid.UUID | None, Query()] = None,
|
||||
) -> ProgressionRead:
|
||||
statement = (
|
||||
select(Workout.started_at, WorkoutSet.weight, WorkoutSet.reps)
|
||||
|
||||
Reference in New Issue
Block a user