feat(observabillity): #153 instrument sqlx
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 2m29s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 2m49s

This commit was merged in pull request #160.
This commit is contained in:
2025-06-07 21:55:59 +02:00
parent c4aca2778f
commit 11f3bcc89f
25 changed files with 434 additions and 409 deletions

View File

@@ -44,7 +44,7 @@ func (h AccountImpl) handleAccountPage() http.HandlerFunc {
return
}
accounts, err := h.s.GetAll(user)
accounts, err := h.s.GetAll(r.Context(), user)
if err != nil {
handleError(w, r, err)
return
@@ -72,7 +72,7 @@ func (h AccountImpl) handleAccountItemComp() http.HandlerFunc {
return
}
account, err := h.s.Get(user, id)
account, err := h.s.Get(r.Context(), user, id)
if err != nil {
handleError(w, r, err)
return
@@ -105,13 +105,13 @@ func (h AccountImpl) handleUpdateAccount() http.HandlerFunc {
id := r.PathValue("id")
name := r.FormValue("name")
if id == "new" {
account, err = h.s.Add(user, name)
account, err = h.s.Add(r.Context(), user, name)
if err != nil {
handleError(w, r, err)
return
}
} else {
account, err = h.s.UpdateName(user, id, name)
account, err = h.s.UpdateName(r.Context(), user, id, name)
if err != nil {
handleError(w, r, err)
return
@@ -135,7 +135,7 @@ func (h AccountImpl) handleDeleteAccount() http.HandlerFunc {
id := r.PathValue("id")
err := h.s.Delete(user, id)
err := h.s.Delete(r.Context(), user, id)
if err != nil {
handleError(w, r, err)
return