Changed the workouts_handlers.go file to use the HasFile method introduced in database/workouts.go instead of manual nil checks.
Updated the GetWorkoutDetails function in database/workouts.go to use GetWorkoutWithGPX instead of GetWorkout.
Updated the AsGPX, UpdateData, and HasExtraMetric methods in database/workouts.go to use the HasFile method.
Added a check for HasFile in the workout actions partial template (views/partials/workout_actions.html) to conditionally display the download, refresh, and edit forms.
… checks
workouts_handlers.go
file to use theHasFile
method introduced indatabase/workouts.go
instead of manual nil checks.GetWorkoutDetails
function indatabase/workouts.go
to useGetWorkoutWithGPX
instead ofGetWorkout
.AsGPX
,UpdateData
, andHasExtraMetric
methods indatabase/workouts.go
to use theHasFile
method.HasFile
in the workout actions partial template (views/partials/workout_actions.html
) to conditionally display the download, refresh, and edit forms.