fix(quality): switch linter and fix errors

This commit is contained in:
2024-12-02 23:26:26 +01:00
parent 7c67720621
commit 0accb49871
7 changed files with 38 additions and 26 deletions

View File

@@ -329,7 +329,10 @@ func (handler HandlerAuthImpl) HandleVerifyResendComp() http.HandlerFunc {
go handler.service.SendVerificationMail(user.Id, user.Email)
w.Write([]byte("<p class=\"mt-8\">Verification email sent</p>"))
_, err = w.Write([]byte("<p class=\"mt-8\">Verification email sent</p>"))
if err != nil {
utils.LogError("Could not write response", err)
}
}
}

View File

@@ -106,7 +106,12 @@ func (handler WorkoutHandlerImpl) handleGetWorkout() http.HandlerFunc {
wos = append(wos, workout.Workout{Id: wo.RowId, Date: wo.Date, Type: wo.Type, Sets: wo.Sets, Reps: wo.Reps})
}
workout.WorkoutListComp(wos).Render(r.Context(), w)
err = workout.WorkoutListComp(wos).Render(r.Context(), w)
if err != nil {
utils.LogError("Could not render workoutlist", err)
utils.TriggerToast(w, r, "error", "Internal Server Error")
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
}