feat(observabillity): #153 instrument sqlx
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 8m11s

This commit is contained in:
2025-06-07 21:55:59 +02:00
parent c4aca2778f
commit 6291700a3b
26 changed files with 425 additions and 402 deletions

View File

@@ -70,13 +70,13 @@ func (h TransactionRecurringImpl) handleUpdateTransactionRecurring() http.Handle
}
if input.Id == "new" {
_, err := h.s.Add(user, input)
_, err := h.s.Add(r.Context(), user, input)
if err != nil {
handleError(w, r, err)
return
}
} else {
_, err := h.s.Update(user, input)
_, err := h.s.Update(r.Context(), user, input)
if err != nil {
handleError(w, r, err)
return
@@ -101,7 +101,7 @@ func (h TransactionRecurringImpl) handleDeleteTransactionRecurring() http.Handle
accountId := r.URL.Query().Get("account-id")
treasureChestId := r.URL.Query().Get("treasure-chest-id")
err := h.s.Delete(user, id)
err := h.s.Delete(r.Context(), user, id)
if err != nil {
handleError(w, r, err)
return
@@ -118,13 +118,13 @@ func (h TransactionRecurringImpl) renderItems(w http.ResponseWriter, r *http.Req
utils.TriggerToastWithStatus(w, r, "error", "Please select an account or treasure chest", http.StatusBadRequest)
}
if accountId != "" {
transactionsRecurring, err = h.s.GetAllByAccount(user, accountId)
transactionsRecurring, err = h.s.GetAllByAccount(r.Context(), user, accountId)
if err != nil {
handleError(w, r, err)
return
}
} else {
transactionsRecurring, err = h.s.GetAllByTreasureChest(user, treasureChestId)
transactionsRecurring, err = h.s.GetAllByTreasureChest(r.Context(), user, treasureChestId)
if err != nil {
handleError(w, r, err)
return